diff options
author | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-11 23:54:52 +0000 |
---|---|---|
committer | bosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-11 23:54:52 +0000 |
commit | ad9b787efbfff948a2d4484b556c2f9c33feda19 (patch) | |
tree | 9da2303d0f6f213449674c2bdfc5322fc7ac0c20 /gcc/ada/exp_ch7.adb | |
parent | 8cbd6728ca4e6f79881c84c40ee7e86d272397b3 (diff) | |
download | gcc-ad9b787efbfff948a2d4484b556c2f9c33feda19.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46210 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r-- | gcc/ada/exp_ch7.adb | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb index 03e83603a1e..825a44d336a 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 |