re PR lto/46504 (LTO failed on 483.xalancbmk in SPEC CPU 2006)

2010-11-17  Richard Guenther  <rguenther@suse.de>

	PR lto/46504
	* gimple.c (gimple_register_canonical_type): Make sure to only
	make type leaders canonical types.

From-SVN: r166870
This commit is contained in:
Richard Guenther 2010-11-17 15:47:17 +00:00 committed by Richard Biener
parent a222c01a3c
commit 3c760b86e1
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2010-11-17 Richard Guenther <rguenther@suse.de>
PR lto/46504
* gimple.c (gimple_register_canonical_type): Make sure to only
make type leaders canonical types.
2010-11-17 Michael Matz <matz@suse.de>
* timevar.def (TV_IPA_OPT, TV_EARLY_LOCAL, TV_OPTIMIZE,

View File

@ -4398,6 +4398,10 @@ gimple_register_canonical_type (tree t)
if (TYPE_CANONICAL (t))
return TYPE_CANONICAL (t);
/* Always register the type itself first so that if it turns out
to be the canonical type it will be the one we merge to as well. */
t = gimple_register_type (t);
/* 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. */