diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-14 16:23:18 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-14 16:23:18 +0000 |
commit | ab2ba306f09948ff09fef49f3592d714c38b2d93 (patch) | |
tree | b12d13d305b3e049e0907c34ad5d505ce04fa415 /gcc/ada/a-except.adb | |
parent | a39fe8c82fd895251538269b679047bd6fc98ac5 (diff) | |
download | gcc-ab2ba306f09948ff09fef49f3592d714c38b2d93.tar.gz |
2008-04-14 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r134275
stilly buggy for libgcc muldi3: internal compiler error: in
execute_ipa_pass_list, at passes.c:1235
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@134279 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-except.adb')
-rw-r--r-- | gcc/ada/a-except.adb | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/gcc/ada/a-except.adb b/gcc/ada/a-except.adb index a07bf294203..7168d48dbfd 100644 --- a/gcc/ada/a-except.adb +++ b/gcc/ada/a-except.adb @@ -377,11 +377,11 @@ package body Ada.Exceptions is -- Run-Time Check Routines -- ----------------------------- - -- These routines are called from the runtime to raise a specific - -- exception with a reason message attached. The parameters are - -- the file name and line number in each case. The names are keyed - -- to the codes defined in Types.ads and a-types.h (for example, - -- the name Rcheck_05 refers to the Reason whose Pos code is 5). + -- These routines raise a specific exception with a reason message + -- attached. The parameters are the file name and line number in each + -- case. The names are keyed to the codes defined in types.ads and + -- a-types.h (for example, the name Rcheck_05 refers to the Reason + -- RT_Exception_Code'Val (5)). procedure Rcheck_00 (File : System.Address; Line : Integer); procedure Rcheck_01 (File : System.Address; Line : Integer); @@ -807,16 +807,20 @@ package body Ada.Exceptions is (E : Exception_Id; Message : String := "") is + EF : Exception_Id := E; + begin - if E /= null then - Exception_Data.Set_Exception_Msg (E, Message); - Abort_Defer.all; - Raise_Current_Excep (E); + -- Raise CE if E = Null_ID (AI-446) + + if E = null then + EF := Constraint_Error'Identity; end if; - -- Note: if E is null then just return (Ada 95 semantics) + -- Go ahead and raise appropriate exception - return; + Exception_Data.Set_Exception_Msg (EF, Message); + Abort_Defer.all; + Raise_Current_Excep (EF); end Raise_Exception; ---------------------------- |