Debian Codegraph @

gcc/testsuite/gnat.dg/initializes.adb

raw
1 -- { dg-do compile }
2
3 package body Initializes is
4 protected body PO is
5 procedure Proc is
6 package Inner with Initializes => (Y => PO) is -- OK
7 Y : Boolean := X;
8 end Inner;
9
10 procedure Nested with Global => PO is -- OK
11 begin
12 null;
13 end Nested;
14 begin
15 Nested;
16 end Proc;
17 end PO;
18
19 protected body PT is
20 procedure Proc is
21 package Inner with Initializes => (Y => PT) is -- OK
22 Y : Boolean := X;
23 end Inner;
24
25 procedure Nested with Global => PT is -- OK
26 begin
27 null;
28 end Nested;
29 begin
30 Nested;
31 end Proc;
32 end PT;
33 end Initializes;