http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53364
--- Comment #4 from Marc Glisse 2012-05-16 07:11:35
UTC ---
Looking at -fdump-tree-all, 081t.phicprop1 is still the same for -O1 and -O2,
but O82t.dse1 is missing the memory writes for -O2.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53364
--- Comment #3 from foom at fuhm dot net 2012-05-16 04:28:21 UTC ---
> Does -fno-tree-vrp fix the issue?
Nope, "g++ -O2 -fno-tree-vrp -c test.cpp" is no different than without.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53364
--- Comment #2 from Andrew Pinski 2012-05-16
04:13:07 UTC ---
Does -fno-tree-vrp fix the issue?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53364
--- Comment #1 from foom at fuhm dot net 2012-05-16 04:10:59 UTC ---
Asm generated. Note that at no point is anything ever actually written to the
stack, only read from it:
:
0:83 3d 00 00 00 00 09 cmpl $0x9,0x0(%rip)