I didn't find a bug report for this yet. This regressoin roughly started happening Oct 26-27. as it shows up in testresults from Janis Johson here. (32-bit default32 compiler. Regression only at -m64)
http://gcc.gnu.org/ml/gcc-testresults/2004-10/msg01382.html Interestingly, this also shows up in my 64-bit default64 compiler but at -m32: http://gcc.gnu.org/ml/gcc-testresults/2004-10/msg01391.html The check that is failing in the test case is: /* { dg-final { scan-tree-dump-times " \\* 17" 0 "vars" } } */ /* { dg-final { scan-tree-dump-times " \\+ 17" 1 "vars" } } */ as 17 * iter is not getting reduced. I played with the testcase a bit using a 32-bit biarch compiler w/ -m64 and noticed a couple things. 1) Changing the iter var from 'int' to a 'long' seems to let the test pass again . The test case is tiny so I'll original code here: struct bla { char x[187]; int y; char z[253]; } arr_base[100]; void xxx(void) { int iter; for (iter = 0; iter < 100; iter++) arr_base[iter].y = 17 * iter; } 2) Dumps of t52.ivopts pass (from dump-tree-all-all), look funny: (add_to_evolution (loop_nb = 1) (chrec_before = 100) (to_add = 1) (res = {100, +, 4294967295}_1)) (evolution_function = {100, +, 4294967295}_1)) (set_scalar_evolution (scalar = ivtmp.1_5) (scalar_evolution = {100, +, 4294967295}_1)) ) ,as 4294967295 looks quite peculiar.and would have expected 0 there. I'll attach the entire loop-2.c.t52.ivopts for 32 bit and for 64 bit, in case someone wise in the ways of tree/loops/scalarev has interest. -- Summary: Failure in tree-ssa/loop-2.c with powerpc64 with biarch Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jgrimm2 at us dot ibm dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: powerpc64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18650