aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-01-30 00:21:24 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-01-30 00:21:24 +0100
commit2bafad93f704c2909c8b5988a0b0e98b57993617 (patch)
treee67112931bc0870ff4c9d06efcb44ad08a4da4f2 /gcc/tree-inline.c
parent1033ffa8b312170efeeef1f3e4f58ced8075eaea (diff)
downloadgcc-2bafad93f704c2909c8b5988a0b0e98b57993617.zip
gcc-2bafad93f704c2909c8b5988a0b0e98b57993617.tar.gz
gcc-2bafad93f704c2909c8b5988a0b0e98b57993617.tar.bz2
re PR middle-end/34969 (ICE with -fipa-cp -ffast-math)
PR middle-end/34969 * cgraph.h (cgraph_update_edges_for_call_stmt): New prototype. * cgraph.c (cgraph_update_edges_for_call_stmt): New function. * tree-inline.c (fold_marked_statements): Call cgraph_update_edges_for_call_stmt if folding a call statement. * cgraphunit.c (verify_cgraph_node): Set cfun to this_cfun for debug_generic_stmt calls, reset it back afterwards. * gcc.dg/pr34969.c: New test. From-SVN: r131946
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index d2ef961..b683f20 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2942,11 +2942,17 @@ fold_marked_statements (int first, struct pointer_set_t *statements)
if (pointer_set_contains (statements, bsi_stmt (bsi)))
{
tree old_stmt = bsi_stmt (bsi);
+ tree old_call = get_call_expr_in (old_stmt);
+
if (fold_stmt (bsi_stmt_ptr (bsi)))
{
update_stmt (bsi_stmt (bsi));
- if (maybe_clean_or_replace_eh_stmt (old_stmt, bsi_stmt (bsi)))
- tree_purge_dead_eh_edges (BASIC_BLOCK (first));
+ if (old_call)
+ cgraph_update_edges_for_call_stmt (old_stmt, old_call,
+ bsi_stmt (bsi));
+ if (maybe_clean_or_replace_eh_stmt (old_stmt,
+ bsi_stmt (bsi)))
+ tree_purge_dead_eh_edges (BASIC_BLOCK (first));
}
}
}