[Bug middle-end/19430] taking address of a var causes missing uninitialized warning (virtual PHI with MEM)
- To: debian-gcc@lists.debian.org
- Subject: [Bug middle-end/19430] taking address of a var causes missing uninitialized warning (virtual PHI with MEM)
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
- Date: Mon, 29 Aug 2022 13:08:26 +0000
- Message-id: <bug-19430-5724-GykqdWBsY6@http.gcc.gnu.org/bugzilla/>
- In-reply-to: <bug-19430-5724@http.gcc.gnu.org/bugzilla/>
- References: <bug-19430-5724@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19430
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-05-03 18:04:44 |2022-8-29
--- Comment #37 from Richard Biener <rguenth at gcc dot gnu.org> ---
Re-confirmed for the original testcase. The issue is that while we now try to
perform uninitialized diagnostics for memory we do not perform the maybe-uninit
analysis via PHIs we do for non-memory. We see
<bb 2> [local count: 1073741824]:
# .MEM_5 = VDEF <.MEM_3(D)>
_1 = bar (i_4(D));
if (_1 != 0)
goto <bb 3>; [33.00%]
else
goto <bb 5>; [67.00%]
<bb 5> [local count: 719407024]:
goto <bb 4>; [100.00%]
<bb 3> [local count: 354334800]:
# .MEM_6 = VDEF <.MEM_5>
baz (&j);
<bb 4> [local count: 1073741824]:
# .MEM_2 = PHI <.MEM_5(5), .MEM_6(3)>
# VUSE <.MEM_2>
_7 = j;
so when we are walking and looking for defs of 'j' by means of
walk_aliased_vdefs but that will simply process MEM_6 "unordered"
and record that as possible definition. We are not properly forking
the walk to discover a path where 'j' is not initialized nor are
we trying to compute predicates which guard the use.
--
You are receiving this mail because:
You are on the CC list for the bug.
Reply to: