aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2024-10-08 15:08:15 +0200
committerEric Botcazou <ebotcazou@adacore.com>2024-10-08 18:01:22 +0200
commit0c002cce5e0e2f3da0f5360f1c49480e57aaaa34 (patch)
tree8a8064398d3ffbed0b697e7b9bf242224673bbe5 /gcc
parent8b407d5c6940a65d78a544f9c66850e619638171 (diff)
downloadgcc-0c002cce5e0e2f3da0f5360f1c49480e57aaaa34.zip
gcc-0c002cce5e0e2f3da0f5360f1c49480e57aaaa34.tar.gz
gcc-0c002cce5e0e2f3da0f5360f1c49480e57aaaa34.tar.bz2
Add regression test
gcc/testsuite/ PR ada/114636 * gnat.dg/specs/generic_inst1.ads: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gnat.dg/specs/generic_inst1.ads32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/specs/generic_inst1.ads b/gcc/testsuite/gnat.dg/specs/generic_inst1.ads
new file mode 100644
index 0000000..fdf48c0
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/generic_inst1.ads
@@ -0,0 +1,32 @@
+-- { dg-do compile }
+
+package Generic_Inst1 is
+
+ generic
+ type Terminals is (<>);
+ type Nonterminals is (<>);
+ package Types is
+ type Action is record
+ data : Integer;
+ end record;
+ end Types;
+
+ generic
+ type States is (<>);
+ type Input_T is (<>);
+ type Action_T is private;
+ package FSM is
+ end FSM;
+
+ generic
+ with package Typs is new Types (<>);
+ with package SMs is new FSM
+ (States => <>, Input_T => Typs.Terminals, Action_T => Typs.Action);
+ package Gen is
+ end Gen;
+
+ package Typs is new Types (Natural, Integer);
+ package SMs is new FSM (Integer, Natural, Typs.Action);
+ package Generator is new Gen (Typs, SMs);
+
+end Generic_Inst1;