From f7d2a3f74ae12f8bfec0e273b5d405e4db73b0b7 Mon Sep 17 00:00:00 2001 From: Javier Miranda Date: Fri, 31 Aug 2007 12:22:03 +0200 Subject: [PATCH] exp_ch11.adb (Expand_At_End_Handler): Avoid generation of raise statement when compiling under restriction... 2007-08-31 Javier Miranda * exp_ch11.adb (Expand_At_End_Handler): Avoid generation of raise statement when compiling under restriction No_Exceptions_Proparation. From-SVN: r127971 --- gcc/ada/exp_ch11.adb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/ada/exp_ch11.adb b/gcc/ada/exp_ch11.adb index 0bf8711..bf2381f 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, -- 2.7.4