Debian Codegraph @

gcc/testsuite/gnat.dg/elab1.ads

raw
1 package elab1 is
2
3 -- the forward declaration is the trigger
4 type Stream;
5
6 type Stream_Ptr is access Stream;
7
8 type Stream is array (Positive range <>) of Character;
9
10 function Get_Size (S : Stream_Ptr) return Natural;
11
12 type Rec (Size : Natural) is
13 record
14 B : Boolean;
15 end record;
16
17 My_Desc : constant Stream_Ptr := new Stream'(1 => ' ');
18
19 My_Size : constant Natural := Get_Size (My_Desc);
20
21 subtype My_Rec is Rec (My_Size);
22
23 end;