diff options
author | Ed Schonberg <schonber@gnat.com> | 2001-10-11 23:54:52 +0000 |
---|---|---|
committer | Geert Bosch <bosch@gcc.gnu.org> | 2001-10-12 01:54:52 +0200 |
commit | 44d8d2bb3bc0b39bff52d12e0d48ebc57116a399 (patch) | |
tree | 9da2303d0f6f213449674c2bdfc5322fc7ac0c20 | |
parent | 89b894e19b9297d4d7e2f85c33253c59356a48b1 (diff) | |
download | gcc-44d8d2bb3bc0b39bff52d12e0d48ebc57116a399.zip gcc-44d8d2bb3bc0b39bff52d12e0d48ebc57116a399.tar.gz gcc-44d8d2bb3bc0b39bff52d12e0d48ebc57116a399.tar.bz2 |
exp_ch7.adb (Find_Final_List): for a type appearing in a with_type clause...
* exp_ch7.adb (Find_Final_List): for a type appearing in a with_type
clause, return the gobal finalization list, for lack of anthing else.
From-SVN: r46210
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/exp_ch7.adb | 19 |
2 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 16ecc43..7e563c5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,10 @@ 2001-10-11 Ed Schonberg <schonber@gnat.com> + * exp_ch7.adb (Find_Final_List): for a type appearing in a with_type + clause, return the gobal finalization list, for lack of anthing else. + +2001-10-11 Ed Schonberg <schonber@gnat.com> + * exp_ch7.adb (Make_Transient_Block): if statement is within exception handler, always use new transient scope to place Clean procedure. diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 03e8360..825a44d 100644 --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -1140,14 +1140,21 @@ package body Exp_Ch7 is -- Case of a dynamically allocated object. The final list is the -- corresponding list controller (The next entity in the scope of - -- the access type with the right type) + -- the access type with the right type). If the type comes from a + -- With_Type clause, no controller was created, and we use the + -- global chain instead. elsif Is_Access_Type (E) then - return - Make_Selected_Component (Loc, - Prefix => - New_Reference_To (Associated_Final_Chain (Base_Type (E)), Loc), - Selector_Name => Make_Identifier (Loc, Name_F)); + if not From_With_Type (E) then + return + Make_Selected_Component (Loc, + Prefix => + New_Reference_To + (Associated_Final_Chain (Base_Type (E)), Loc), + Selector_Name => Make_Identifier (Loc, Name_F)); + else + return New_Reference_To (RTE (RE_Global_Final_List), Sloc (E)); + end if; else if Is_Dynamic_Scope (E) then |