aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/specs/generic_inst7.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gnat.dg/specs/generic_inst7.ads')
-rw-r--r--gcc/testsuite/gnat.dg/specs/generic_inst7.ads17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/specs/generic_inst7.ads b/gcc/testsuite/gnat.dg/specs/generic_inst7.ads
new file mode 100644
index 0000000..3132525
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/generic_inst7.ads
@@ -0,0 +1,17 @@
+-- { dg-do compile }
+
+package Generic_Inst7 is
+
+ function F return Integer is (0);
+
+ generic
+ with function Foo return Integer;
+ package P is
+ type Color is (Foo);
+ end P;
+
+ package My_P is new P (F);
+
+ I : Integer := My_P.Foo; -- { dg-error "expected type|found type" }
+
+end Generic_Inst7;