Debian Codegraph @

gcc/testsuite/gnat.dg/generic_actuals.adb

raw
1 -- { dg-do compile }
2 -- { dg-options "-gnatd.F" }
3
4 procedure Generic_Actuals with SPARK_Mode is
5 generic
6 X : Integer;
7 Y : Integer := 0;
8 package Q with Initializes => (XX => X, YY => Y) is
9 -- Both X and Y actuals can appear in the Initializes contract,
10 -- i.e. the default expression of Y should not matter.
11 XX : Integer := X;
12 YY : Integer := Y;
13 end Q;
14
15 package Inst is new Q (X => 0);
16 begin
17 null;
18 end Generic_Actuals;