aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-01-05 22:45:08 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2015-01-05 22:45:08 +0100
commit15aed8c4609257ea0280553ad2a5946bdaf06ec9 (patch)
tree332cf62cb06a61bcde73d0b785c00583c95a8315 /gcc/tree-inline.c
parentd1f4e4c31ce23f5e3bda3ca8be040c6c6d58ec29 (diff)
downloadgcc-15aed8c4609257ea0280553ad2a5946bdaf06ec9.zip
gcc-15aed8c4609257ea0280553ad2a5946bdaf06ec9.tar.gz
gcc-15aed8c4609257ea0280553ad2a5946bdaf06ec9.tar.bz2
re PR middle-end/64465 (internal compiler error: verify_flow_info failed)
PR tree-optimization/64465 * tree-inline.c (redirect_all_calls): During inlining clean up EH stmts and EH edges if redirect_call_stmt_to_callee changed the stmt to a non-throwing call. * gcc.dg/pr64465.c: New test. From-SVN: r219200
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index e573def..902eb95 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2582,13 +2582,19 @@ void
redirect_all_calls (copy_body_data * id, basic_block bb)
{
gimple_stmt_iterator si;
+ gimple last = last_stmt (bb);
for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
{
- if (is_gimple_call (gsi_stmt (si)))
+ gimple stmt = gsi_stmt (si);
+ if (is_gimple_call (stmt))
{
- struct cgraph_edge *edge = id->dst_node->get_edge (gsi_stmt (si));
+ struct cgraph_edge *edge = id->dst_node->get_edge (stmt);
if (edge)
- edge->redirect_call_stmt_to_callee ();
+ {
+ edge->redirect_call_stmt_to_callee ();
+ if (stmt == last && id->call_stmt && maybe_clean_eh_stmt (stmt))
+ gimple_purge_dead_eh_edges (bb);
+ }
}
}
}