aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 31bfc39..2f45836 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -2869,7 +2869,10 @@ bsi_replace (const block_stmt_iterator *bsi, tree stmt, bool preserve_eh_info)
{
eh_region = lookup_stmt_eh_region (orig_stmt);
if (eh_region >= 0)
- add_stmt_to_eh_region (stmt, eh_region);
+ {
+ remove_stmt_from_eh_region (stmt);
+ add_stmt_to_eh_region (stmt, eh_region);
+ }
}
delink_stmt_imm_use (orig_stmt);