Bug 41713 - -O -flto -g: ICE in lto_output_tree_ref, at lto-streamer-out.c:732
Summary: -O -flto -g: ICE in lto_output_tree_ref, at lto-streamer-out.c:732
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: 4.5.0
Assignee: Richard Biener
URL:
Keywords: ice-on-valid-code, lto
Depends on:
Blocks:
 
Reported: 2009-10-15 08:28 UTC by Tobias Burnus
Modified: 2009-10-16 14:23 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-10-16 11:41:16


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2009-10-15 08:28:04 UTC
$ 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
Comment 1 Richard Biener 2009-10-16 09:04:45 UTC
Confirmed.  Alex didn't update LTO with the introduction of DEBUG_EXPR_DECLs.
Comment 2 Richard Biener 2009-10-16 11:41:16 UTC
I'll fix it anyway.
Comment 3 Richard Biener 2009-10-16 14:21:29 UTC
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

Comment 4 Richard Biener 2009-10-16 14:23:40 UTC
Fixed.