summaryrefslogtreecommitdiff
path: root/gcc/ada/a-except-2005.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-15 09:48:58 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-15 09:48:58 +0000
commitc075f76ac2aa31b03539eec812020224f5955374 (patch)
tree3c72a329b1ee07250517a96a07e36dca186dffe9 /gcc/ada/a-except-2005.adb
parent504c14e8a3451b5815db041150de9663fa84b97f (diff)
downloadgcc-c075f76ac2aa31b03539eec812020224f5955374.tar.gz
2012-05-15 Tristan Gingold <gingold@adacore.com>
* exp_ch7.adb (Build_Exception_Handler): Save current occurrence only if -gnateE. (Build_Object_Declaration): Declare E_Id only if -gnateE. (Build_Raise_Statement): Call Raise_From_Controlled_Operation only if -gnateE (else raise PE). * s-soflin.adb (Save_Library_Occurrence): Handle null occurrence access. * a-except-2005.adb (Reraise_Library_Exception_If_Any): Call Raise_From_Controlled_Operation only if the saved occurrence is not null, otherwise raise PE. 2012-05-15 Yannick Moy <moy@adacore.com> * exp_alfa.ads: Add comments describing the Alfa mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187514 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-except-2005.adb')
-rw-r--r--gcc/ada/a-except-2005.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/a-except-2005.adb b/gcc/ada/a-except-2005.adb
index 989280801ae..179a0bdddda 100644
--- a/gcc/ada/a-except-2005.adb
+++ b/gcc/ada/a-except-2005.adb
@@ -1296,7 +1296,13 @@ package body Ada.Exceptions is
begin
if Library_Exception_Set then
LE := Library_Exception;
- Raise_From_Controlled_Operation (LE);
+ if LE.Id = Null_Id then
+ Raise_Exception_No_Defer
+ (E => Program_Error'Identity,
+ Message => "finalize/adjust raised exception");
+ else
+ Raise_From_Controlled_Operation (LE);
+ end if;
end if;
end Reraise_Library_Exception_If_Any;