with current trunk compiling CP2K with -flto, I get the ICE below. As a side note, lto needs already ~10Gb of RAM at this point. 'matmov' is a small function:
SUBROUTINE matmov ( n, m, a, lda, b, ldb ) INTEGER :: n, m, lda COMPLEX(8) :: a( lda, * ) INTEGER :: ldb COMPLEX(8) :: b( ldb, * ) b ( 1:n , 1:m ) = a ( 1:n, 1:m ) END SUBROUTINE matmov cp2k/obj/Linux-x86-64-gfortran/sdbg> gfortran -flto -O2 -march=native -ffree-form -o test.x *.o -L/users/vondele/LAPACK/ -llapack_gfortran_4_4 -lblas_gfortran_4_4 -L/ext/software/64/gfortran-suite/lib -lfftw3 -lderiv -lint /ext/software/64/gfortran-suite/lib/libint_wrapper.o -lstdc++ In function matmov: lto1: error: type mismatch in indirect reference __complex__ <float:64>[0:] <float:64>[0:D.1810] # .MEM_43 = VDEF <.MEM_41> (*b_37(D))[D.1662_33] = D.1664_36; lto1: internal compiler error: verify_stmts failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: /data03/vondele/gcc_lto/build/bin/gfortran returned 1 exit status collect2: lto-wrapper returned 1 exit status -- Summary: lto1: error: type mismatch in indirect reference Product: gcc Version: lto Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jv244 at cam dot ac dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41069