The attached subroutine is compiled as follows:

gfortran -c -flto -O2 -fwhole-program bkfconv.F90

and then the object file is placed in a library of its own:

ar rv x.a bkfconv.o

Subsequently, a main program, b.f:

      call deep_convection
      end

is linked with this library, as follows:

gfortran -fuse-linker-plugin -flto -O2 -fwhole-program b.f x.a

This results in the ICE in the subject.

gfortran -v
Using built-in specs.
COLLECT_GCC=/usr/snp/bin/gfortran
COLLECT_LTO_WRAPPER=/usr/snp/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --enable-checking=release --prefix=/usr/snp
--enable-gold --enable-plugins --disable-multilib --disable-nls
--with-arch-64=native --with-tune-64=native --enable-languages=fortran,c++
--enable-stage1-languages=c++ --disable-werror
Thread model: posix
gcc version 4.6.0 20100514 (experimental) (GCC) 

ld -v
GNU gold (GNU Binutils 2.20.51.20100506) 1.9


-- 
           Summary: lto1: internal compiler error: in
                    lto_symtab_merge_decls_1, at lto-symtab.c:610
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: toon at moene dot org
  GCC host triplet: x64_86-unknown-linux-gnu


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

Reply via email to