[Bug fortran/52621] New: ICE when compiling Fortran77 code with optimization

pepalogik at seznam dot cz gcc-bugzilla@gcc.gnu.org
Mon Mar 19 16:13:00 GMT 2012


             Bug #: 52621
           Summary: ICE when compiling Fortran77 code with optimization
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pepalogik@seznam.cz

Created attachment 26920
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26920
Library source producing the ICE

I am compiling an old Fortran 77 code on Windows XP. I have fixed this code to
make it basically work in both FTN95 (Silverfrost) and gfortran compilers. But
when I try to make a highly optimized build with gfortran, I get an ICE.

Compiler version:
C:\MinGW\bin>gfortran.exe -v
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.6.1/configure
j-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp
-disable-win32-registry --enable-libstdcxx-debug
me-libs --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.6.1 (GCC)

gfortran.exe -std=legacy -march=native -mfpmath=sse -m3dnow -mmmx -msse -msse2
-msse3  -O3   -Wall    -c D:\Jenda\cbp\SATLEED\LEEDSATL_SB\leedsatl_sb.f -o

CPU: AMD Athlon x2, see

Important: The ICE is gone if I decrease the optimization level to -O2 or
exclude the machine specific options (from -march to -msse3).

The code and output are attached.

Copyright note: The code comes from
and I am actually not allowed to distribute it.

More information about the Gcc-bugs mailing list