diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2013-07-05 10:41:59 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2013-07-05 12:41:59 +0200 |
commit | da1b76c1656bca32734a9f38fb0d9a7e4b6eed71 (patch) | |
tree | dfe64a5cd65360eb4312d2b8bfdeb93c0dbe7511 | |
parent | 67a90476cfab907864d3c97decdba6373be1b8b7 (diff) | |
download | gcc-da1b76c1656bca32734a9f38fb0d9a7e4b6eed71.zip gcc-da1b76c1656bca32734a9f38fb0d9a7e4b6eed71.tar.gz gcc-da1b76c1656bca32734a9f38fb0d9a7e4b6eed71.tar.bz2 |
exp_ch4.adb (Expand_Composite_Equality): Use the full view when the base type is private.
2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_Composite_Equality): Use the full view
when the base type is private.
From-SVN: r200706
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/exp_ch4.adb | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3b1202d..5de3e2a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2013-07-05 Hristian Kirtchev <kirtchev@adacore.com> + + * exp_ch4.adb (Expand_Composite_Equality): Use the full view + when the base type is private. + 2013-07-05 Claire Dross <dross@adacore.com> * a-cfdlli.ads: Add preconditions when needed. diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 70dfce9..e8baffe 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 |