]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
exp_ch4.adb (Expand_Composite_Equality): Use the full view when the base type is...
authorHristian Kirtchev <kirtchev@adacore.com>
Fri, 5 Jul 2013 10:41:59 +0000 (10:41 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 5 Jul 2013 10:41:59 +0000 (12:41 +0200)
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

gcc/ada/ChangeLog
gcc/ada/exp_ch4.adb

index 3b1202dfba351f212f32821379940fc7de8d7473..5de3e2a19b5e49551804aab6c26d2851832864d8 100644 (file)
@@ -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.
index 70dfce97e1d8d0284343d7d000f793387bbd4d9e..e8baffe0b5f67b8ea2b2b39dee98108f437dc04c 100644 (file)
@@ -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