------- Comment #17 from ro at CeBiTec dot Uni-Bielefeld dot DE 2010-06-07 16:32 ------- Subject: Re: [4.4/4.5/4.6 Regression] gcc trunk 143562 - Testsuite - gfortran failing tests that worked previously
I've now analysed this further: the test only fails at -O3. The failure is an abort in l.23: DDA1 = ATAN2 ((/(REAL(J1,KV),J1=1,10)/), $ REAL((/(J1,J1=nf10,nf1,mf1)/), KV)) !fails DDA2 = ATAN2 (DDA, DDA(10:1:-1)) if (any (DDA1 .ne. DDA2)) call abort () Investigating with gdb, I find that only the 10th array element differs: (gdb ) p dda1 $1 = (0.0996686518, 0.218668953, 0.358770669, 0.519146085, 0.694738269, 0.876058042, 1.05165017, 1.21202564, 1.35212743, 1.47112763) (gdb) p dda2 $2 = (0.0996686518, 0.218668953, 0.358770669, 0.519146085, 0.694738269, 0.876058042, 1.05165017, 1.21202564, 1.35212743, 8.40779079e-45) I've verified that atan2f is called with exactly the same input sequence in both cases. The problem is that at -O0 (and probably up to -O2), atan2f is called 2 x 10 times as expected, and atan2f only appears twice in the assembler output. On the other hand, at -O3 the second time through, atan2f(1.0) isn't called. Instead, the loop is unrolled, but incorrectly, it seems: there are now only19 calls to atan2f in the assembler output. Rainer -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38946