diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-07-09 15:04:59 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-07-09 15:04:59 +0200 |
commit | a6f0cb16c658263c398773c27387adc6b10b236c (patch) | |
tree | fb77b7b5b44c1f6a19636abaad55d26ba365a9ef /gcc/ada/a-exexpr-gcc.adb | |
parent | 02663f24a578d0ada1aa44220f545b4e0fe09c29 (diff) | |
download | gcc-a6f0cb16c658263c398773c27387adc6b10b236c.zip gcc-a6f0cb16c658263c398773c27387adc6b10b236c.tar.gz gcc-a6f0cb16c658263c398773c27387adc6b10b236c.tar.bz2 |
[multiple changes]
2012-07-09 Tristan Gingold <gingold@adacore.com>
* a-exexpr-gcc.adb (CleanupUnwind_Handler): Now imported from
raise-gcc.c
* raise-gcc.c (__gnat_cleanupunwind_handler): Defined.
Strictly follow the ABI convention on ia64.
2012-07-09 Gary Dismukes <dismukes@adacore.com>
* a-ststio.ads: Add pragma Preelaborate, per AI05-0283.
* i-cstrea.ads (max_path_len): Change from variable to deferred
constant to allow it to be used as a bound in string component
in type System.File_IO.Temp_File_Record.
* s-os_lib.ads, s-commun.ads, s-ficobl.ads, s-fileio.ads: Add pragma
Preelaborate.
* s-fileio.adb (Get_Case_Sensitive): Move function inside
procedure Open.
(File_Names_Case_Sensitive): Move variable inside
procedure Open, to avoid violation of Preelaborate restriction
(due to call to Get_Case_Sensitive).
2012-07-09 Ed Schonberg <schonberg@adacore.com>
* layout.adb (Set_Elem_Alignment): Protect against meaningless
size clause, to prevent overflow in internal computation of
alignment.
From-SVN: r189375
Diffstat (limited to 'gcc/ada/a-exexpr-gcc.adb')
-rw-r--r-- | gcc/ada/a-exexpr-gcc.adb | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/gcc/ada/a-exexpr-gcc.adb b/gcc/ada/a-exexpr-gcc.adb index 4d651d5..bf241da 100644 --- a/gcc/ada/a-exexpr-gcc.adb +++ b/gcc/ada/a-exexpr-gcc.adb @@ -44,9 +44,7 @@ package body Exception_Propagation is ------------------------------------------------ -- These come from "C++ ABI for Itanium: Exception handling", which is - -- the reference for GCC. They are used only when we are relying on - -- back-end tables for exception propagation, which in turn is currently - -- only the case for Zero_Cost_Exceptions in GNAT5. + -- the reference for GCC. -- Return codes from the GCC runtime functions used to propagate -- an exception. @@ -63,7 +61,8 @@ package body Exception_Propagation is URC_CONTINUE_UNWIND); pragma Unreferenced - (URC_FOREIGN_EXCEPTION_CAUGHT, + (URC_NO_REASON, + URC_FOREIGN_EXCEPTION_CAUGHT, URC_PHASE2_ERROR, URC_PHASE1_ERROR, URC_NORMAL_STOP, @@ -83,13 +82,14 @@ package body Exception_Propagation is UA_CLEANUP_PHASE : constant Unwind_Action := 2; UA_HANDLER_FRAME : constant Unwind_Action := 4; UA_FORCE_UNWIND : constant Unwind_Action := 8; - UA_END_OF_STACK : constant Unwind_Action := 16; -- GCC extension ? + UA_END_OF_STACK : constant Unwind_Action := 16; -- GCC extension pragma Unreferenced (UA_SEARCH_PHASE, UA_CLEANUP_PHASE, UA_HANDLER_FRAME, - UA_FORCE_UNWIND); + UA_FORCE_UNWIND, + UA_END_OF_STACK); -- Mandatory common header for any exception object handled by the -- GCC unwinding runtime. @@ -221,6 +221,8 @@ package body Exception_Propagation is UW_Exception : not null GCC_Exception_Access; UW_Context : System.Address; UW_Argument : System.Address) return Unwind_Reason_Code; + pragma Import (C, CleanupUnwind_Handler, + "__gnat_cleanupunwind_handler"); -- Hook called at each step of the forced unwinding we perform to -- trigger cleanups found during the propagation of an unhandled -- exception. @@ -316,34 +318,6 @@ package body Exception_Propagation is Free (Copy); end GNAT_GCC_Exception_Cleanup; - --------------------------- - -- CleanupUnwind_Handler -- - --------------------------- - - function CleanupUnwind_Handler - (UW_Version : Integer; - UW_Phases : Unwind_Action; - UW_Eclass : Exception_Class; - UW_Exception : not null GCC_Exception_Access; - UW_Context : System.Address; - UW_Argument : System.Address) return Unwind_Reason_Code - is - pragma Unreferenced (UW_Version, UW_Eclass, UW_Context, UW_Argument); - - begin - -- Terminate when the end of the stack is reached - - if UW_Phases >= UA_END_OF_STACK then - Unhandled_Except_Handler (UW_Exception); - end if; - - -- We know there is at least one cleanup further up. Return so that it - -- is searched and entered, after which Unwind_Resume will be called - -- and this hook will gain control again. - - return URC_NO_REASON; - end CleanupUnwind_Handler; - ------------------------- -- Setup_Current_Excep -- ------------------------- |