diff options
author | Javier Miranda <miranda@adacore.com> | 2008-05-20 14:45:15 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-05-20 14:45:15 +0200 |
commit | 7e5ce5a8c48eeda48b61a1d82abddb76dd07f115 (patch) | |
tree | 86a4c4ec72f7e1277bec9d4bcde4167e2899a374 /gcc/ada/exp_aggr.adb | |
parent | 685094bfdee3a606aa8ebf491f4968d9cd4879db (diff) | |
download | gcc-7e5ce5a8c48eeda48b61a1d82abddb76dd07f115.tar.gz |
2008-05-20 Javier Miranda <miranda@adacore.com>
* exp_aggr.adb
(Build_Record_Aggr_Code): Fix wrong tests checking progenitors. Previous
tests did not covered the case in which the type of the aggregate has
no progenitors but some its parents has progenitors.
From-SVN: r135620
Diffstat (limited to 'gcc/ada/exp_aggr.adb')
-rw-r--r-- | gcc/ada/exp_aggr.adb | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb index c815369e821..af531ab6ed0 100644 --- a/gcc/ada/exp_aggr.adb +++ b/gcc/ada/exp_aggr.adb @@ -2573,11 +2573,7 @@ package body Exp_Aggr is -- Ada 2005 (AI-251): If tagged type has progenitors we must -- also initialize tags of the secondary dispatch tables. - if Present (Abstract_Interfaces (Base_Type (Typ))) - and then not - Is_Empty_Elmt_List - (Abstract_Interfaces (Base_Type (Typ))) - then + if Has_Abstract_Interfaces (Base_Type (Typ)) then Init_Secondary_Tags (Typ => Base_Type (Typ), Target => Target, @@ -3084,10 +3080,7 @@ package body Exp_Aggr is -- abstract interfaces we must also initialize the tags of the -- secondary dispatch tables. - if Present (Abstract_Interfaces (Base_Type (Typ))) - and then not - Is_Empty_Elmt_List (Abstract_Interfaces (Base_Type (Typ))) - then + if Has_Abstract_Interfaces (Base_Type (Typ)) then Init_Secondary_Tags (Typ => Base_Type (Typ), Target => Target, @@ -3317,8 +3310,10 @@ package body Exp_Aggr is and then Ekind (Current_Scope) /= E_Return_Statement and then not Is_Limited_Type (Typ) then - Establish_Transient_Scope (Aggr, Sec_Stack => - Is_Controlled (Typ) or else Has_Controlled_Component (Typ)); + Establish_Transient_Scope + (Aggr, + Sec_Stack => + Is_Controlled (Typ) or else Has_Controlled_Component (Typ)); end if; Insert_Actions_After (N, Late_Expansion (Aggr, Typ, Occ, Obj => Obj)); |