aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2008-04-16 12:37:38 +0000
committerSamuel Tardieu <sam@gcc.gnu.org>2008-04-16 12:37:38 +0000
commit35c91e0571501b3d876e4e0c5b4cf33da758f1da (patch)
tree7129d76c3d30754954850039ec1009c661d0f75a /gcc/ada
parent78347d72334be8ae1db5adc1c7b258cd8b98fad0 (diff)
downloadgcc-35c91e0571501b3d876e4e0c5b4cf33da758f1da.zip
gcc-35c91e0571501b3d876e4e0c5b4cf33da758f1da.tar.gz
gcc-35c91e0571501b3d876e4e0c5b4cf33da758f1da.tar.bz2
re PR ada/29015 (Ada 2005 observer pattern with mutually dependent packages and containers produces compiler error)
gcc/ada/ PR ada/29015 * sem_ch12.adb (Instantiate_Type): Check whether the full view of the type is known instead of the underlying type. gcc/testsuite/ PR ada/29015 * gnat.dg/incomplete1.ads, gnat.dg/incomplete2.ads, gnat.dg/incomplete2.adb: New. From-SVN: r134345
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/sem_ch12.adb2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 950d1dd..346866e 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-16 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/29015
+ * sem_ch12.adb (Instantiate_Type): Check whether the full view of
+ the type is known instead of the underlying type.
+
2008-04-15 Ed Schonberg <schonberg@adacore.com>
PR ada/22387
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb
index c44f392..60833fc 100644
--- a/gcc/ada/sem_ch12.adb
+++ b/gcc/ada/sem_ch12.adb
@@ -9990,7 +9990,7 @@ package body Sem_Ch12 is
Ekind (Root_Type (Act_T)) = E_Incomplete_Type)
then
if Is_Class_Wide_Type (Act_T)
- or else No (Underlying_Type (Act_T))
+ or else No (Full_View (Act_T))
then
Error_Msg_N ("premature use of incomplete type", Actual);
Abandon_Instantiation (Actual);