Commit 7a00d9ea by Richard Guenther Committed by Richard Biener

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
parent 06c7edcc
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
* lto-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
Do not stream DECL_ABSTRACT_ORIGIN.
......
......@@ -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. */
......
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
* gfortran.dg/lto/pr46911_0.f: New testcase.
......
/* { 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment