diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-15 09:38:10 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-15 09:38:10 +0000 |
commit | ea150575d7b91fde3e0f0dfa8db003c08b68dd81 (patch) | |
tree | 206359c222e19b3caaae36b5e2fbd40231df7656 /gcc/ada/s-finimp.adb | |
parent | c6eb017a825a226c0506e038e5a0722e833892e5 (diff) | |
download | gcc-ea150575d7b91fde3e0f0dfa8db003c08b68dd81.tar.gz |
2006-02-13 Thomas Quinot <quinot@adacore.com>
Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Expand_Allocator_Expression): Pass Allocator => True to
Make_Adjust_Call done for a newly-allocated object.
* exp_ch7.ads, exp_ch7.adb (Expand_Cleanup_Actions): If the statements
in a subprogram are wrapped in a cleanup block, indicate that the
subprogram contains an inner block with an exception handler.
(Make_Adjust_Call): New Boolean formal Allocator indicating whether the
Adjust call is for a newly-allocated object. In that case we must not
assume that the finalization list chain pointers are correct (since they
come from a bit-for-bit copy of the original object's pointers) so if
the attach level would otherwise be zero (no change), we set it to 4
instead to cause the pointers to be reset to null.
* s-finimp.adb (Attach_To_Final_List): New attach level: 4, meaning
reset chain pointers to null.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111060 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-finimp.adb')
-rw-r--r-- | gcc/ada/s-finimp.adb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/s-finimp.adb b/gcc/ada/s-finimp.adb index 712bb127b68..133c47ca285 100644 --- a/gcc/ada/s-finimp.adb +++ b/gcc/ada/s-finimp.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2006, 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- -- @@ -60,8 +60,8 @@ package body System.Finalization_Implementation is new Unchecked_Conversion (Address, RC_Ptr); procedure Raise_Exception_No_Defer - (E : in Exception_Id; - Message : in String := ""); + (E : Exception_Id; + Message : String := ""); pragma Import (Ada, Raise_Exception_No_Defer, "ada__exceptions__raise_exception_no_defer"); pragma No_Return (Raise_Exception_No_Defer); @@ -214,6 +214,13 @@ package body System.Finalization_Implementation is P.Next := L; L := Obj'Unchecked_Access; end; + + -- Make the object completely unattached (case of a library-level, + -- Finalize_Storage_Only object). + + elsif Nb_Link = 4 then + Obj.Prev := null; + Obj.Next := null; end if; end Attach_To_Final_List; |