aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-complex.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2008-12-29 19:25:19 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-12-29 19:25:19 +0100
commit04be6ff5a8e2709d4b474375a65c0868258abdcd (patch)
treed72f82cac0cb96faec875085d1d3a9b6077f8ae7 /gcc/tree-complex.c
parent67d0afe9011dfe0e010113694e4577451855075a (diff)
downloadgcc-04be6ff5a8e2709d4b474375a65c0868258abdcd.zip
gcc-04be6ff5a8e2709d4b474375a65c0868258abdcd.tar.gz
gcc-04be6ff5a8e2709d4b474375a65c0868258abdcd.tar.bz2
re PR middle-end/36191 (can't use complex in a eh region if non-call-exceptions is enabled)
PR c++/36191 * tree-complex.c (expand_complex_libcall): Call maybe_clean_or_replace_eh_stmt and gimple_purge_dead_eh_edges instead of passing true as 3rd argument to gsi_replace. * g++.dg/torture/pr36191.C: New test. From-SVN: r142950
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r--gcc/tree-complex.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index 939bd6f..c7a7ad4 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -953,10 +953,10 @@ expand_complex_libcall (gimple_stmt_iterator *gsi, tree ar, tree ai,
enum machine_mode mode;
enum built_in_function bcode;
tree fn, type, lhs;
- gimple stmt;
+ gimple old_stmt, stmt;
- stmt = gsi_stmt (*gsi);
- lhs = gimple_assign_lhs (stmt);
+ old_stmt = gsi_stmt (*gsi);
+ lhs = gimple_assign_lhs (old_stmt);
type = TREE_TYPE (lhs);
mode = TYPE_MODE (type);
@@ -973,7 +973,10 @@ expand_complex_libcall (gimple_stmt_iterator *gsi, tree ar, tree ai,
stmt = gimple_build_call (fn, 4, ar, ai, br, bi);
gimple_call_set_lhs (stmt, lhs);
update_stmt (stmt);
- gsi_replace (gsi, stmt, true);
+ gsi_replace (gsi, stmt, false);
+
+ if (maybe_clean_or_replace_eh_stmt (old_stmt, stmt))
+ gimple_purge_dead_eh_edges (gsi_bb (*gsi));
if (gimple_in_ssa_p (cfun))
{