aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-03-01 09:46:19 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-03-01 09:46:19 +0000
commit7a00d9eaf66d34d3e26938e890a4fb880df531f4 (patch)
tree4350359914b33a7170ae49a554770232e317a6c9 /gcc/lto-streamer.c
parent06c7edcc27e82d457693e971b2f7a7830b12a0a5 (diff)
downloadgcc-7a00d9eaf66d34d3e26938e890a4fb880df531f4.zip
gcc-7a00d9eaf66d34d3e26938e890a4fb880df531f4.tar.gz
gcc-7a00d9eaf66d34d3e26938e890a4fb880df531f4.tar.bz2
re PR lto/47924 (Missed optimization with LTO)
2011-03-01 Richard Guenther <rguenther@suse.de> PR lto/47924 * lto-streamer.c (lto_record_common_node): Also register the canonical type. * gcc.dg/lto/pr47924_0.c: New testcase. From-SVN: r170589
Diffstat (limited to 'gcc/lto-streamer.c')
-rw-r--r--gcc/lto-streamer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/lto-streamer.c b/gcc/lto-streamer.c
index dba9d2d..67132ef 100644
--- a/gcc/lto-streamer.c
+++ b/gcc/lto-streamer.c
@@ -527,7 +527,9 @@ lto_record_common_node (tree *nodep, VEC(tree, heap) **common_nodes,
are set by the middle-end. */
if (in_lto_p)
TYPE_CANONICAL (node) = NULL_TREE;
- *nodep = node = gimple_register_type (node);
+ node = gimple_register_type (node);
+ TYPE_CANONICAL (node) = gimple_register_canonical_type (node);
+ *nodep = node;
}
/* Return if node is already seen. */