The following code ices with the given options:

$ cat icey.f
      SUBROUTINE IRCGS2(NC,QA,QB,QC,RTRMS)
      IMPLICIT DOUBLE PRECISION(A-H,O-Z)
      DIMENSION QA(NC), QB(NC), QC(NC), QCM(6000), QBM(6000), QAM(6000),
     * RTRMS(NC)
      IF (NC .GT. 6000) NC = 6000
      DO 30 I = 1,NC
         RTRMSI = RTRMS(I)
         QAM(I) = QA(I) / RTRMSI
         QBM(I) = QB(I) / RTRMSI
         QCM(I) = QC(I) / RTRMSI
   30 CONTINUE
      RETURN
      END

$ gfc -c -march=pentium4 -O -ffast-math -ftree-vectorize  icey.f
icey.f:12: internal compiler error: in output_constant_pool_2, at varasm.c:3339
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Adding -fno-automatic and there is no ice.

$ gfc -c -march=pentium4 -O -ffast-math -ftree-vectorize -fno-automatic  icey.f
$

Using -march=k8 instead of -march=pentium4 also ices.

Getting rid of the -march= and the ice goes away.

$ gfc -v Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../main/configure --prefix=/home/jerry/gcc/usr
--enable-languages=c,fortran --disable-libmudflap
Thread model: posix
gcc version 4.2.0 20060323 (experimental)


-- 
           Summary: ice in varasm.c with certain flags
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jvdelisle at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26821

Reply via email to