aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-10-13 10:06:28 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-10-13 10:06:28 +0000
commit72351fa31f66161bd2ce7fa996bc6b4fca3ad2ce (patch)
tree6aa17beec9e5ff5f167458432718aad437e812e5 /gcc/cgraphunit.c
parenta1178b309a5d316fe6040380a540807495acadc5 (diff)
downloadgcc-72351fa31f66161bd2ce7fa996bc6b4fca3ad2ce.zip
gcc-72351fa31f66161bd2ce7fa996bc6b4fca3ad2ce.tar.gz
gcc-72351fa31f66161bd2ce7fa996bc6b4fca3ad2ce.tar.bz2
re PR middle-end/45874 (ICE in verify_flow_info failed)
2010-10-13 Richard Guenther <rguenther@suse.de> PR middle-end/45874 * cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Fixup the CFG when EH was fixed up. * g++.dg/torture/pr45874.C: New testcase. From-SVN: r165416
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index e9d1f1d..95f30e2 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -2167,13 +2167,17 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e)
SSA_NAME_DEF_STMT (gimple_vdef (new_stmt)) = new_stmt;
gsi = gsi_for_stmt (e->call_stmt);
- gsi_replace (&gsi, new_stmt, true);
+ gsi_replace (&gsi, new_stmt, false);
+ if (maybe_clean_or_replace_eh_stmt (e->call_stmt, new_stmt))
+ gimple_purge_dead_eh_edges (gimple_bb (new_stmt));
}
else
{
new_stmt = e->call_stmt;
gimple_call_set_fndecl (new_stmt, e->callee->decl);
update_stmt (new_stmt);
+ if (maybe_clean_eh_stmt (new_stmt))
+ gimple_purge_dead_eh_edges (gimple_bb (new_stmt));
}
cgraph_set_call_stmt_including_clones (e->caller, e->call_stmt, new_stmt);