diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2013-07-05 10:41:59 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@adacore.com> | 2013-07-05 10:41:59 +0000 |
commit | b5685a100c8dbea9769c8c48444149de398a0761 (patch) | |
tree | dfe64a5cd65360eb4312d2b8bfdeb93c0dbe7511 | |
parent | b9cca1d470863589c948a09448d8fb126f39f5f3 (diff) |
2013-07-05 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_Composite_Equality): Use the full view
when the base type is private.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@200706 138bc75d-0d04-0410-961f-82ee72b054a4
-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 3b1202dfba3..5de3e2a19b5 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 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 |