[multiple changes]
authorArnaud Charlet <charlet@gcc.gnu.org>
Wed, 16 Jun 2010 15:47:23 +0000 (17:47 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Wed, 16 Jun 2010 15:47:23 +0000 (17:47 +0200)
2010-06-16  Ed Schonberg  <schonberg@adacore.com>

* sem_ch3.adb (Complete_Private_Subtype): Inherit class_wide type from
base type only if it was not previously created for the partial view.

2010-06-16  Thomas Quinot  <quinot@adacore.com>

* tbuild.ads: Minor comment fix

From-SVN: r160843

gcc/ada/ChangeLog
gcc/ada/sem_ch3.adb
gcc/ada/tbuild.ads

index 808696c..a5e8ab6 100644 (file)
@@ -1,3 +1,12 @@
+2010-06-16  Ed Schonberg  <schonberg@adacore.com>
+
+       * sem_ch3.adb (Complete_Private_Subtype): Inherit class_wide type from
+       base type only if it was not previously created for the partial view.
+
+2010-06-16  Thomas Quinot  <quinot@adacore.com>
+
+       * tbuild.ads: Minor comment fix
+
 2010-06-15  Nathan Froyd  <froydnj@codesourcery.com>
 
        * gcc-interface/trans.c (gnu_stack_free_list): Delete.
index 6e0efe1..160bdbb 100644 (file)
@@ -9584,7 +9584,14 @@ package body Sem_Ch3 is
       if Is_Tagged_Type (Full_Base) then
          Set_Is_Tagged_Type (Full);
          Set_Primitive_Operations (Full, Primitive_Operations (Full_Base));
-         Set_Class_Wide_Type      (Full, Class_Wide_Type (Full_Base));
+
+         --  Inherit class_wide type of full_base in case the partial view was
+         --  not tagged. Otherwise it has already been created when the private
+         --  subtype was analyzed.
+
+         if No (Class_Wide_Type (Full)) then
+            Set_Class_Wide_Type (Full, Class_Wide_Type (Full_Base));
+         end if;
 
       --  If this is a subtype of a protected or task type, constrain its
       --  corresponding record, unless this is a subtype without constraints,
index 0b73a53..f6b02cc 100644 (file)
@@ -183,7 +183,7 @@ package Tbuild is
    --  Create a defining identifier to capture the value of an expression
    --  or aggregate, and link it to the expression that it replaces, in
    --  order to provide better CodePeer reports. The defining identifier
-   --  name is obtained by Make_Internal_Name (Id).
+   --  name is obtained by New_Internal_Name (Id).
 
    function Make_Unsuppress_Block
      (Loc   : Source_Ptr;