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
+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
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);
+2008-04-16 Samuel Tardieu <sam@rfc1149.net>
+
+ PR ada/29015
+ * gnat.dg/incomplete1.ads, gnat.dg/incomplete2.ads,
+ gnat.dg/incomplete2.adb: New.
+
2008-04-16 Hans-Peter Nilsson <hp@axis.com>
PR tree-optimization/35629
--- /dev/null
+package Incomplete1 is
+ type T is null record;
+end Incomplete1;
--- /dev/null
+-- { dg-do compile }
+-- { dg-excess-errors "instantiation abandoned" }
+with Incomplete1;
+package body Incomplete2 is end Incomplete2;
--- /dev/null
+limited with Incomplete1;
+package Incomplete2 is
+ pragma Elaborate_Body;
+ generic
+ type T is private;
+ package G is end G;
+ package I1 is new G (Incomplete1.T); -- { dg-error "premature use" }
+end Incomplete2;