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
+2011-03-01 Richard Guenther <rguenther@suse.de>
+
+ PR lto/47924
+ * lto-streamer.c (lto_record_common_node): Also register
+ the canonical type.
+
2011-03-01 Richard Guenther <rguenther@suse.de>
PR lto/46911
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. */
+2011-03-01 Richard Guenther <rguenther@suse.de>
+
+ PR lto/47924
+ * gcc.dg/lto/pr47924_0.c: New testcase.
+
2011-03-01 Richard Guenther <rguenther@suse.de>
PR lto/46911
--- /dev/null
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-O2 -flto}} } */
+
+extern void link_error (void);
+short *p __attribute__((used));
+int i __attribute__((used));
+
+int main()
+{
+ if (i == 0)
+ return;
+
+ *p = 0;
+
+ if (i == 0)
+ link_error ();
+
+ return 0;
+}