Bug 48938 - [4.7 Regression] ICE: in lto_wpa_write_files, at lto/lto.c:1992 with -O -flto --param lto-min-partition=1
Summary: [4.7 Regression] ICE: in lto_wpa_write_files, at lto/lto.c:1992 with -O -flto...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: lto (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-checking, ice-on-valid-code, lto
Depends on: 48246
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-09 18:52 UTC by Zdenek Sojka
Modified: 2011-08-02 14:08 UTC (History)
2 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.6.1
Known to fail: 4.7.0
Last reconfirmed: 2011-05-15 16:14:06


Attachments
reduced testcase (74 bytes, text/plain)
2011-05-09 18:52 UTC, Zdenek Sojka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2011-05-09 18:52:40 UTC
Created attachment 24215 [details]
reduced testcase

Compiler output:
$ gcc -r -nostdlib -O -flto --param lto-min-partition=1 testcase.C 
lto1: internal compiler error: in lto_wpa_write_files, at lto/lto.c:1992
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /mnt/svn/gcc-trunk/binary-latest/bin/gcc returned 1 exit status
collect2: lto-wrapper returned 1 exit status

Tested revisions:
r173549 - crash
4.6 r173059 - OK
Comment 1 Richard Biener 2011-05-10 10:32:06 UTC
I think we have a dup for this.  On the 4.6 branch I "fixed" this by
turning the assert into a checking-assert.

Thus, this seems related to PR48246.
Comment 2 Zdenek Sojka 2011-05-10 16:40:46 UTC
Thanks for the reply. You are right, the assert described in PR48246 is at the same place. However, I have 4.6 configured with --enable-checking=yes,rtl,df - so checking_assert() should be triggered.
Comment 3 H.J. Lu 2011-05-15 16:14:06 UTC
It is caused by revision 173517:

http://gcc.gnu.org/ml/gcc-cvs/2011-05/msg00295.html
Comment 4 Richard Biener 2011-08-02 14:08:33 UTC
Seems to be fixed.