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

end;