With revision r163997 this test passed. >From revision r163998 and on, including at least r164242 this test has failed as follows:
Running /tmp/reg_a4_998/gcc/gcc/testsuite/gfortran.dg/dg.exp ... ... (non-regressions elided) FAIL: gfortran.dg/forall_4.f90 -O3 -g execution test With the message in the logfile being: Executing on host: /tmp/reg_a4_998/gccobj/gcc/testsuite/gfortran/../../gfortran -B/tmp/reg_a4_998/gccobj/gcc/testsuite/gfortran/../../ /tmp/reg_a4_998/gcc/gcc/testsuite/gfortran.dg/forall_4.f90 -O3 -g -pedantic-errors -isystem /tmp/reg_a4_998/gccobj/cris-elf/./newlib/targ-include -isystem /tmp/reg_a4_998/gcc/newlib/libc/include -B/tmp/reg_a4_998/gccobj/cris-elf/./libgloss/cris/ -L/tmp/reg_a4_998/gccobj/cris-elf/./libgloss/cris -L/tmp/reg_a4_998/gcc/libgloss/cris -B/tmp/reg_a4_998/gccobj/cris-elf/./newlib/ -L/tmp/reg_a4_998/gccobj/cris-elf/./newlib -sim3 -B/tmp/reg_a4_998/gccobj/cris-elf/./libgfortran/.libs -L/tmp/reg_a4_998/gccobj/cris-elf/./libgfortran/.libs -L/tmp/reg_a4_998/gccobj/cris-elf/./libiberty -lm -o ./forall_4.exe (timeout = 300) PASS: gfortran.dg/forall_4.f90 -O3 -g (test for excess errors) program stopped with signal 6. FAIL: gfortran.dg/forall_4.f90 -O3 -g execution test A shortened test-case is attached, in which the second call to abort is executed. Apparently the "-g" is critical. There is the following assembly-code difference without/with "-g". Note the actual *code* difference among the expected debug-label differences, in which the comparison-part of the cstore is lost: ... @@ -62,18 +103,24 @@ _main: cmpq 4,$r9 bne .L16 nop +.LBE48: +.LBE47: + .loc 1 32 0 clear.d [$sp+32] clear.d [$sp+36] clear.d [$sp+40] clear.d [$sp+44] - move.b 1,$r13 - cmp.d [$sp+16],$r13 +.LBB49: + .loc 1 33 0 seq $r9 - cmp.d [$sp+24],$r13 + move.d [$sp+24],$r13 + cmpq 1,$r13 seq $r13 lslq 16,$r13 or.d $r13,$r9 oR.d 16777472,$r9 +.LBE49: +.LBB50: move.b $r9,$r9 bne .L18 nop ... There is no such actual code difference with r163997. N.B: CRIS is a cc0 target. Author of patch for this revision CC:ed. -- Summary: [4.5 Regression]: gfortran.dg/forall_4.f90 -O3, wrong code with -g Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hp at gcc dot gnu dot org GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: cris-axis-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45656