From dbdaaad01d866c0620f69b9b78b8dadef5425e54 Mon Sep 17 00:00:00 2001
From: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 4 Jan 2006 16:29:32 +0000
Subject: [PATCH]         PR ada/24994         * tree-cfg.c (bsi_replace):
 Remove the original statement         from the EH throw statement table.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109335 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog  | 6 ++++++
 gcc/tree-cfg.c | 5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 90d37de683d3..b818536ad29a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-04  Jeff Law  <law@redhat.com>
+
+	PR ada/24994
+	* tree-cfg.c (bsi_replace): Remove the original statement
+	from the EH throw statement table.
+
 2006-01-04  Jakub Jelinek  <jakub@redhat.com>
 
 	* config/i386/pmm_malloc.h (posix_memalign): If __cplusplus,
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 31bfc39dbce5..2f4583600f79 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);
-- 
GitLab