re PR tree-optimization/63255 (FAIL: gcc.dg/lto/ipareference2 c_lto_ipareference2_0.o-c_lto_ipareference2_1.o execute -O1 -flto -flto-partition=1to1 -fwhole-program)
PR tree-optimization/63255 * ipa.c (symbol_table::remove_unreachable_nodes): Fix ordering issue in setting body_removed flag. From-SVN: r215415
This commit is contained in:
parent
e2254932f9
commit
1acc55917e
|
@ -1,3 +1,9 @@
|
|||
2014-09-19 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
PR tree-optimization/63255
|
||||
* ipa.c (symbol_table::remove_unreachable_nodes): Fix ordering
|
||||
issue in setting body_removed flag.
|
||||
|
||||
2014-09-19 Jan Hubicka <hubicka@ucw.cz>
|
||||
|
||||
PR c++/61825
|
||||
|
|
10
gcc/ipa.c
10
gcc/ipa.c
|
@ -538,6 +538,11 @@ symbol_table::remove_unreachable_nodes (bool before_inlining_p, FILE *file)
|
|||
fprintf (file, " %s", vnode->name ());
|
||||
changed = true;
|
||||
}
|
||||
/* Keep body if it may be useful for constant folding. */
|
||||
if ((init = ctor_for_folding (vnode->decl)) == error_mark_node)
|
||||
vnode->remove_initializer ();
|
||||
else
|
||||
DECL_INITIAL (vnode->decl) = init;
|
||||
vnode->body_removed = true;
|
||||
vnode->definition = false;
|
||||
vnode->analyzed = false;
|
||||
|
@ -545,11 +550,6 @@ symbol_table::remove_unreachable_nodes (bool before_inlining_p, FILE *file)
|
|||
|
||||
vnode->remove_from_same_comdat_group ();
|
||||
|
||||
/* Keep body if it may be useful for constant folding. */
|
||||
if ((init = ctor_for_folding (vnode->decl)) == error_mark_node)
|
||||
vnode->remove_initializer ();
|
||||
else
|
||||
DECL_INITIAL (vnode->decl) = init;
|
||||
vnode->remove_all_references ();
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue