summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-31 10:22:03 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-31 10:22:03 +0000
commitebe17e851e0b55887cbfe8a61605741108e4bdd2 (patch)
tree7b90323b95b349741e68a521d35908ee9e616a2b /gcc
parent4734e88eef28ab9b9fa28af16a98fef982799f51 (diff)
downloadgcc-ebe17e851e0b55887cbfe8a61605741108e4bdd2.tar.gz
2007-08-31 Javier Miranda <miranda@adacore.com>
* exp_ch11.adb (Expand_At_End_Handler): Avoid generation of raise statement when compiling under restriction No_Exceptions_Proparation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127971 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_ch11.adb11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb
index 0bf8711dd62..bf2381f43d9 100644
--- a/gcc/ada/exp_ch11.adb
+++ b/gcc/ada/exp_ch11.adb
@@ -142,8 +142,15 @@ package body Exp_Ch11 is
Stmnts := New_List (
Make_Procedure_Call_Statement (Loc,
- Name => New_Occurrence_Of (Clean, Loc)),
- Make_Raise_Statement (Loc));
+ Name => New_Occurrence_Of (Clean, Loc)));
+
+ -- Avoid generation of raise stmt if compiling with no exceptions
+ -- propagation
+
+ if not Restriction_Active (No_Exception_Propagation) then
+ Append_To (Stmnts,
+ Make_Raise_Statement (Loc));
+ end if;
Set_Exception_Handlers (HSS, New_List (
Make_Implicit_Exception_Handler (Loc,