http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47483
Summary: [4.6.0 regression] ce3 moves dereference before
implied non-NULL test
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
Target: i686-pc-linux-gnu
Created attachment 23138
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23138
Compile with -O2 -m32 on i686-pc-linux-gnu, run to crash
I simplified this testcase from a FOR_EACH_LOCAL_DECL loop I introduced as part
of an attempt to fix the latent problem that remained from bug 47106, after the
reversal that fixed bug 47402.
ce3 regards the memory reference as safe, for it's marked as non-trapping
(which is true, since it's guarded by the test), and then it decides to move it
ahead of the test that made it safe in the first place.
This is a regression, it works with 4.5.