From: charlet Date: Mon, 2 May 2016 09:29:09 +0000 (+0000) Subject: 2016-05-02 Thomas Quinot X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ada11b00ff255c79c09295025020e56b23993dc5;p=thirdparty%2Fgcc.git 2016-05-02 Thomas Quinot * freeze.adb (Check_Component_Storage_Order): Get full view of component type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235716 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index f867b8271cb1..c4fa0ae19af3 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2016-05-02 Thomas Quinot + + * freeze.adb (Check_Component_Storage_Order): Get full view of + component type. + 2016-05-02 Hristian Kirtchev * checks.adb, freeze.adb, sem_res.adb, s-stposu.adb, repinfo.adb: diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index bbb07af9d349..1fce94778185 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -1242,6 +1242,13 @@ package body Freeze is -- the attribute definition clause is attached to the first subtype. Comp_Type := Base_Type (Comp_Type); + + -- If the base type is incomplete or private, go to full view if known + + if Present (Underlying_Type (Comp_Type)) then + Comp_Type := Underlying_Type (Comp_Type); + end if; + Comp_ADC := Get_Attribute_Definition_Clause (First_Subtype (Comp_Type), Attribute_Scalar_Storage_Order);