[Bug tree-optimization/64823] [5.0 Regression] false "may be used uninitialized", missed jump threading
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jan 28 12:08:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64823
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Known to work| |4.9.2
Keywords| |diagnostic,
| |missed-optimization
Last reconfirmed| |2015-01-28
Component|c |tree-optimization
CC| |law at gcc dot gnu.org
Ever confirmed|0 |1
Summary|[5.0 Regression] false "may |[5.0 Regression] false "may
|be used uninitialized" |be used uninitialized",
| |missed jump threading
Target Milestone|--- |5.0
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the issue is we apply loop header copying here and correctly don't warn
about
the first loop body but figure the 2nd iteration is guarded with
effectively o->next != NULL which isn't the same predicate s was initialized
under.
This is also a missed jump-threading:
<bb 2>:
if (o_4(D) != 0B)
goto <bb 3>;
else
goto <bb 15>;
<bb 15>:
goto <bb 4>;
<bb 3>:
s_7 = o_4(D)->se;
<bb 4>:
# s_16 = PHI <s_7(3), s_5(D)(15)>
goto <bb 9>;
...
<bb 9>:
# o_10 = PHI <o_4(D)(4), o_11(8)>
# s_13 = PHI <s_16(4), s_2(8)>
if (o_10 != 0B)
goto <bb 10>;
else
goto <bb 13>;
...
<bb 13>:
return;
Jeff - is DOM not able to see that? The threading is in the loop header
but threads to the exit (that is, I'd thread the o_4(D) == 0 case to bb 13).
Looks like 4.9 does that in DOM1 already.
More information about the Gcc-bugs
mailing list