aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-reference.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-12-15 07:19:51 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2014-12-15 06:19:51 +0000
commitdea91a66ff51bb0f37db48baebc7e098947713e9 (patch)
tree7d0f222bbf1aafe6ff3d8426db8aafe30396b616 /gcc/ipa-reference.c
parentf1ced6f5e7e78a6818c4820c4a5f103b74112f93 (diff)
downloadgcc-dea91a66ff51bb0f37db48baebc7e098947713e9.zip
gcc-dea91a66ff51bb0f37db48baebc7e098947713e9.tar.gz
gcc-dea91a66ff51bb0f37db48baebc7e098947713e9.tar.bz2
re PR ipa/61602 (ICE in lto1 on x86_64-linux-gnu in ipa_single_use, at ipa.c:1257)
PR ipa/61602 * gcc.dg/torture/pr61602.c: New testcase. * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Return bool. * ipa.c (set_writeonly_bit): Track if reference was removed. (ipa_discover_readonly_nonaddressable_vars): Return true if any references was removed. * ipa-reference.c (propagate): Return TODO_remove_functions if reference was removed. From-SVN: r218731
Diffstat (limited to 'gcc/ipa-reference.c')
-rw-r--r--gcc/ipa-reference.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index b046f9e..714a0ee 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -676,11 +676,12 @@ propagate (void)
XCNEWVEC (struct cgraph_node *, symtab->cgraph_count);
int order_pos;
int i;
+ bool remove_p;
if (dump_file)
cgraph_node::dump_cgraph (dump_file);
- ipa_discover_readonly_nonaddressable_vars ();
+ remove_p = ipa_discover_readonly_nonaddressable_vars ();
generate_summary ();
/* Propagate the local information through the call graph to produce
@@ -867,7 +868,7 @@ propagate (void)
if (dump_file)
splay_tree_delete (reference_vars_to_consider);
reference_vars_to_consider = NULL;
- return 0;
+ return remove_p ? TODO_remove_functions : 0;
}
/* Return true if we need to write summary of NODE. */