http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51635
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-20
14:47:25 UTC ---
Doesn't work. Instead testing a similar
Index: gcc/lto/lto.c
===================================================================
--- gcc/lto/lto.c (revision 182525)
+++ gcc/lto/lto.c (working copy)
@@ -845,6 +845,14 @@ uniquify_nodes (struct data_in *data_in,
if (ix < i)
lto_fixup_types (f2);
streamer_tree_cache_insert_at (cache, f1, ix);
+ /* Make sure that the type of a TYPE_DECL refers
+ to the type decl that prevails in the prevailing
+ record or union type. */
+ if (TREE_CODE (f1) == TYPE_DECL)
+ {
+ tree f1t = gimple_register_type (TREE_TYPE (f1));
+ TYPE_NAME (f1t) = f1;
+ }
}
}