Bug 46525 - [4.6 Regression] Failed to bootstrap-lto
Summary: [4.6 Regression] Failed to bootstrap-lto
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: lto (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-17 18:00 UTC by H.J. Lu
Modified: 2010-11-18 13:12 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-11-18 10:04:31


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2010-11-17 18:00:06 UTC
On Linux/x86-64, revision 166867] failed with bootstrap-lto:

http://gcc.gnu.org/ml/gcc-regression/2010-11/msg00229.html

Revision 166855 is OK.
Comment 1 H.J. Lu 2010-11-17 18:56:09 UTC
Revision 166872 gave:

http://gcc.gnu.org/ml/gcc-regression/2010-11/msg00230.html

xgcc: internal compiler error: Segmentation fault (program lto1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /export/gnu/import/svn/gcc-test/bld/./prev-gcc/xgcc returned 4 exit status
lto-wrapper failedcollect2: ld returned 1 exit status
make[6]: *** [jc1] Error 1
make[6]: *** Waiting for unfinished jobs....
xgcc: internal compiler error: Segmentation fault (program lto1)
Comment 2 H.J. Lu 2010-11-18 00:31:24 UTC
It is caused by revision 166870:

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00759.html
Comment 3 Richard Biener 2010-11-18 10:04:31 UTC
Mine then.  How do you build bootstrap-lto?
Comment 4 Richard Biener 2010-11-18 11:16:35 UTC
Hm.  We have

  t (leader)  ->  main-variant (but t is its leader)

so we violated

  /* Always register the main variant first.  This is important so we
     pick up the non-typedef variants as canonical, otherwise we'll end
     up taking typedef ids for structure tags during comparison.  */
  if (TYPE_MAIN_VARIANT (t) != t)
    gimple_register_type (TYPE_MAIN_VARIANT (t));

somehow.  This results in endless recursion between the two fns.

I have a patch.
Comment 5 Richard Biener 2010-11-18 11:55:33 UTC
I'm past the failure but now see comparison fails of all files.  Ah, I forgot
--frandom-seed=0.
Comment 6 Richard Biener 2010-11-18 13:10:45 UTC
Author: rguenth
Date: Thu Nov 18 13:10:40 2010
New Revision: 166902

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166902
Log:
2010-11-18  Richard Guenther  <rguenther@suse.de>

	PR lto/46525
	* gimple.c (gimple_register_type): Update TYPE_MAIN_VARIANT of
	type leaders.
	(gimple_register_canonical_type): Also cache the canoncial type
	for non type leaders.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple.c
Comment 7 Richard Biener 2010-11-18 13:12:10 UTC
Fixed.