https://gcc.gnu.org/g:932d1c3adb5759a0f37779ed027e96647bdb8b60
commit r14-10754-g932d1c3adb5759a0f37779ed027e96647bdb8b60 Author: Eric Botcazou <ebotca...@adacore.com> Date: Tue Oct 8 15:08:15 2024 +0200 Add regression test gcc/testsuite/ PR ada/114636 * gnat.dg/specs/generic_inst1.ads: New test. Diff: --- gcc/testsuite/gnat.dg/specs/generic_inst1.ads | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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 000000000000..fdf48c020b09 --- /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;