http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60427
Bug ID: 60427 Summary: [4.9 Regression] r208312 causes ICE and wrong code for Fortran with -flto Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: dominiq at lps dot ens.fr CC: pmatos at gcc dot gnu.org, rguenth at gcc dot gnu.org After r208312 (+ the fix in r208315) I get FAIL: gfortran.dg/pr33794.f90 -g -flto execution test with both -m32/-m64, and FAIL: gfortran.dg/nint_2.f90 -g -flto (internal compiler error) with -m64 (r208311 + the fix in r208315 is OK). The ICE occurs for the following reduced test real(kind=8) :: a integer(kind=8) :: i1 ! a = nearest(0.5_8,-1.0_8) ! i1 = nint(a) a = 0.5_8 i1 = nint(a) ! a = nearest(0.5_8,1.0_8) ! i1 = nint(a) end [Book15] f90/bug% /opt/gcc/gcc4.9p-208312/bin/gfortran -flto nint_2_red.f90 nint_2_red.f90: In function 'MAIN__': nint_2_red.f90:8:0: internal compiler error: Segmentation fault: 11 i1 = nint(a) The wong code is produced with '-O1 -ffast-math -flto' for gfortran.dg/pr33794.f90 as well as the polyhedron test fatigue.f90.