mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
06c7edcc27
commit
7a00d9eaf6
|
@ -1,3 +1,9 @@
|
||||||
|
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>
|
2011-03-01 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR lto/46911
|
PR lto/46911
|
||||||
|
|
|
@ -527,7 +527,9 @@ lto_record_common_node (tree *nodep, VEC(tree, heap) **common_nodes,
|
||||||
are set by the middle-end. */
|
are set by the middle-end. */
|
||||||
if (in_lto_p)
|
if (in_lto_p)
|
||||||
TYPE_CANONICAL (node) = NULL_TREE;
|
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. */
|
/* Return if node is already seen. */
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2011-03-01 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR lto/46911
|
PR lto/46911
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
/* { 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;
|
||||||
|
}
|
Loading…
Reference in New Issue