===================================================================
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
+-- Copyright (C) 1992-2012, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -162,14 +162,15 @@
-----------------------------------
procedure Unhandled_Exception_Terminate is
- Excep : constant EOA := Save_Occurrence (Get_Current_Excep.all.all);
+ Excep : Exception_Occurrence;
-- This occurrence will be used to display a message after finalization.
-- It is necessary to save a copy here, or else the designated value
-- could be overwritten if an exception is raised during finalization
-- (even if that exception is caught).
begin
- Last_Chance_Handler (Excep.all);
+ Save_Occurrence (Excep, Get_Current_Excep.all.all);
+ Last_Chance_Handler (Excep);
end Unhandled_Exception_Terminate;
------------------------------------