The following program will ICE when compiled with -O2 -fprefetch-loop-arrays on a x86_64 box or on IA64 box (Linux and/or HP-UX in 64 bit mode). scale_bbs_frequencies_int is called with nbbs=1, num=0, and den=0. Since we do a division by den, the compiler aborts during the division. If we give X a size of 2 instead of 1, the ICE does not happen.
$ cat x.f SUBROUTINE TFHF(HINT,NVAR,NCOORD,LDI) IMPLICIT DOUBLE PRECISION(A-H,O-Z) DIMENSION HINT(LDI,NVAR) COMMON /FMCOM / X(1) LHI = 1 + LOADFM + (NCOORD*NVAR) + (NCOORD*NCOORD+NCOORD)/2 LOC = LHI-1 DO 160 I = 1,NVAR DO 150 J = 1,I LOC = LOC + 1 HINT(I,J) = X(LOC) HINT(J,I) = X(LOC) 150 CONTINUE 160 CONTINUE RETURN END $ gfortran -O2 -fprefetch-loop-arrays -c x.f x.f: In function 'tfhf': x.f:1: internal compiler error: Floating point exception Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. -- Summary: ICE with FORTRAN and -fprefetch-loop-arrays Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sje at cup dot hp dot com GCC target triplet: x86_64-*-* ia64-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32087