aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2010-06-16 17:47:23 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-16 17:47:23 +0200
commit0fb31b5f7b3abdc1643fafa77601a0e425a29db2 (patch)
treea0d97dbe81d505415bc7b31d7bb5192dbc0245e2
parent59f9c2ed530507a5dcaaf4c6d3789b908dc3dfa6 (diff)
downloadgcc-0fb31b5f7b3abdc1643fafa77601a0e425a29db2.zip
gcc-0fb31b5f7b3abdc1643fafa77601a0e425a29db2.tar.gz
gcc-0fb31b5f7b3abdc1643fafa77601a0e425a29db2.tar.bz2
[multiple changes]
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
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/sem_ch3.adb9
-rw-r--r--gcc/ada/tbuild.ads2
3 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 808696c..a5e8ab6 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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.
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index 6e0efe1..160bdbb 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -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,
diff --git a/gcc/ada/tbuild.ads b/gcc/ada/tbuild.ads
index 0b73a53..f6b02cc 100644
--- a/gcc/ada/tbuild.ads
+++ b/gcc/ada/tbuild.ads
@@ -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;