summaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-29 23:21:24 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-29 23:21:24 +0000
commit117ef3d76b737e937778304657d91df31d5dfbdb (patch)
treee67112931bc0870ff4c9d06efcb44ad08a4da4f2 /gcc/tree-inline.c
parentc55e294338dfc6dfeac5b73556c763f9e47cab35 (diff)
downloadgcc-117ef3d76b737e937778304657d91df31d5dfbdb.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131946 138bc75d-0d04-0410-961f-82ee72b054a4
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 d2ef9619eb2..b683f20a70e 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));
}
}
}