$ gfortran -O -flto -g -c test.f test.f: In function 'makenumberstring_': test.f:8:0: internal compiler error: in lto_output_tree_ref, at lto-streamer-out.c:732 That's with Rev. 152840 (and thus later then Rev. 152767 which fixed PR 41521). Reduced testcase: FUNCTION makenumberstring(x) IMPLICIT NONE REAL, INTENT(IN) :: x CHARACTER(len=20) :: makenumberstring INTEGER :: xx xx = x**2 ! << ICE makenumberstring = '' END FUNCTION
Confirmed. Alex didn't update LTO with the introduction of DEBUG_EXPR_DECLs.
I'll fix it anyway.
Subject: Bug 41713 Author: rguenth Date: Fri Oct 16 14:21:05 2009 New Revision: 152902 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152902 Log: 2009-10-16 Richard Guenther <rguenther@suse.de> PR lto/41713 * lto-streamer-out.c (lto_output_tree_ref): Handle DEBUG_EXPR_DECL the same as VAR_DECL. * gfortran.dg/lto/20091016-1_0.f90: New testcase. Added: trunk/gcc/testsuite/gfortran.dg/lto/20091016-1_0.f90 Modified: trunk/gcc/ChangeLog trunk/gcc/lto-streamer-out.c trunk/gcc/testsuite/ChangeLog
Fixed.