http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47879
Summary: wrong-debugICE in dwarf2out.c:add_AT_specification Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: lto, wrong-debug Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org CC: rgue...@gcc.gnu.org, pa...@gcc.gnu.org, bur...@gcc.gnu.org Depends on: 47839 +++ This bug was initially created as a clone of Bug #47839 +++ Building 459.GemsFDTD (and 416.gamess) with -O3 -ffast-math -flto -g ICEs because the Fortran frontend seemingly puts imported variables in the BLOCK tree of the imported function and does not mark them external. The variable in question is huy_param from huygens_mod, imported from nft_store SUBROUTINE NFT_Store(Ex,Ey,Ez,Hx,Hy,Hz,t,ts) USE excite_mod, ONLY : excitation USE huygens_mod, ONLY : Huy_param, HuyPulseType and MODULE Huygens_mod ... real(kind=rfp), dimension(excite_max_no_param), PUBLIC :: Huy_param I tried to create a small testcase but failed sofar. It doesn't ICE with -flto-partition=none but it does with -flto-partition=1to1. With partially linking 459.GemsFDTD I get the ICE with /abuild/rguenther/install-trunk/usr/local/bin/gfortran globalvar.f90 PEC.f90 -o GemsFDTD -flto -flto-partition=none -r -nostdlib -O -g which is then obviously related to a different variable. Trying to reduce the sources now.