GNU Fortran fails on powerpc-linux with "-O2 -ftree-loop-linear" with an ICE for this testcase, minimized from swim.f in SPEC CPU2000:
SUBROUTINE BUG INTEGER I, J, M REAL V COMMON A(100,100), B(100,100), M, V DO 200 I = 1, M DO 100 J = 1, M V = V + A(I,J) 100 CONTINUE B(I,I) = B(I,I) * I 200 CONTINUE STOP END The output is: elm3b11% /opt/gcc-nightly/trunk/bin/gfortran -c -O2 -ftree-loop-linear bug.f bug.f: In function bug: bug.f:1: internal compiler error: in execute_todo, at passes.c:714 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. A regression hunt identified this patch: http://gcc.gnu.org/viewcvs?view=rev&rev=113862 r113862 | spop | 2006-05-17 14:25:59 +0000 (Wed, 17 May 2006) The same patch also introduces memory exhaustion failures when compiling equake or ammp from SPEC CPU2000 on powerpc64-linux with "-O2 -ftree-loop-linear" and either -m32 or -m64, and for applu with those options and -m64. I don't have a minimized testcase for any of those. -- Summary: ICE in execute_todo with -O2 -ftree-loop-linear Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: janis at gcc dot gnu dot org GCC target triplet: powerpc-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27745