On Linux/x86, revision 164252: http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00546.html caused: FAIL: gcc.dg/guality/sra-1.c -O2 line 42 a.j == 14 FAIL: gcc.dg/guality/sra-1.c -O2 -flto line 42 a.j == 14 FAIL: gcc.dg/guality/sra-1.c -O2 -fwhopr line 42 a.j == 14 FAIL: gcc.dg/guality/sra-1.c -O3 -fomit-frame-pointer line 42 a.j == 14 FAIL: gcc.dg/guality/sra-1.c -O3 -g line 42 a.j == 14 FAIL: gcc.dg/guality/sra-1.c -Os line 42 a.j == 14
Confirmed.
Created attachment 21789 [details] gcc46-pr45663.patch A sign extension insn for the first bar call is scheduled before the a.j++ insns with the debug_insn for a$j. While at the call itself the vars already have expected values, at the first insn on the same line as the first bar call (the sign extension) a.j is still 13, not 14. I think we could fix this up by adjusting the testcase (with current trunk it gives no failures on both x86_64-linux and i686-linux), though haven't tested other targets.
Not sure I understand everything involved here, but isn't the test a little suspect any time higher optimization levels and instruction scheduling are enabled?
*** Bug 45675 has been marked as a duplicate of this bug. ***
Author: jakub Date: Tue Nov 9 19:06:06 2010 New Revision: 166505 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166505 Log: PR middle-end/45663 * gcc.dg/guality/sra-1.c: Move all gdb-test lines to the second bar invocation instead of first. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/guality/sra-1.c
.