From: Hristian Kirtchev Date: Fri, 5 Jul 2013 10:41:59 +0000 (+0000) Subject: exp_ch4.adb (Expand_Composite_Equality): Use the full view when the base type is... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da1b76c1656bca32734a9f38fb0d9a7e4b6eed71;p=gcc.git exp_ch4.adb (Expand_Composite_Equality): Use the full view when the base type is private. 2013-07-05 Hristian Kirtchev * exp_ch4.adb (Expand_Composite_Equality): Use the full view when the base type is private. From-SVN: r200706 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3b1202dfba3..5de3e2a19b5 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2013-07-05 Hristian Kirtchev + + * exp_ch4.adb (Expand_Composite_Equality): Use the full view + when the base type is private. + 2013-07-05 Claire Dross * a-cfdlli.ads: Add preconditions when needed. diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 70dfce97e1d..e8baffe0b5f 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -2580,6 +2580,13 @@ package body Exp_Ch4 is Full_Type := Base_Type (Full_Type); + -- When the base type itself is private, use the full view to expand + -- the composite equality. + + if Is_Private_Type (Full_Type) then + Full_Type := Underlying_Type (Full_Type); + end if; + if Is_Array_Type (Full_Type) then -- If the operand is an elementary type other than a floating-point