Fortran benchmark gamess from SPEC CPU2006 fails to build with current mainline on powerpc-linux with "-O2 -ftree-loop-linear" due to the following ICE: elm3b149% /home/janis/tools/gcc-trunk-anonsvn/bin/gfortran -c -O2 -ftree-loop-linear bug.f bug.f: In function ‘foo’: bug.f:1: internal compiler error: in initialize_matrix_A, at tree-data-ref.c:1899 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. The following minimized testcase demonstrates the same problem: subroutine foo (n,x,y) implicit none double precision y(23821) double precision x(0:2*n) integer len,i,j,k,n len=0 do i=0,n do j=0,i do k=j,i len=len+1 y(len)=x(i-j)/(x(k+j)*x(i-k)) enddo enddo enddo return end The failure starts with this patch: http://gcc.gnu.org/viewcvs?view=rev&rev=135116 r135116 | spop | 2008-05-09 16:17:47 +0000 (Fri, 09 May 2008) -- Summary: ICE in initialize_matrix_A with gamess for -ftree-loop- linear Product: gcc Version: 4.4.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-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37007