[Bug fortran/31971] New: Simple Fortran code fails with ICE

magnus_os at yahoo dot se gcc-bugzilla@gcc.gnu.org
Thu May 17 10:49:00 GMT 2007


gfortran-43 -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gcc-43
--program-suffix=-43 --enable-threads=posix --enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.3.0 20070517 (experimental)

gfortran-43 -save-temps -c test.for
test.for: In function ‘xyz’:
test.for:1: internal compiler error: Illegal instruction

"-save-temps" does not return any meaningful output.

A simple oiece of code that reproduces this problem follows below. Delete the
IF-statement and there's no longer any ICE.



      SUBROUTINE XYZ( XY, KPT )
C
      IMPLICIT DOUBLE PRECISION ( A - H, O - Z ), INTEGER ( I - N )
C
      DIMENSION XY(*)
C
      I = 0
      DO 6000 JP = 1, 10
         ABC = XY( JP )
         IF ( ABC .GT. 0.0D0 )  THEN
C
            DO 300 KK = 1, KPT
               I = I + 1
 300        CONTINUE
C
         END IF
C
 6000 CONTINUE
C
      RETURN
      END


-- 
           Summary: Simple Fortran code fails with ICE
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: magnus_os at yahoo dot se


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



More information about the Gcc-bugs mailing list