aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/discr37.ads
blob: 7d91b2d594e591b7db8610c402ca509e8bf54805 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package Discr37 is

  subtype Index is Integer range 0 .. 100;

  type Root;
  type Frame_Ptr is access all Root'Class;

  type Arr is array (Index range <>) of Frame_Ptr;

  type Root (Level : Index) is tagged record
    S : Arr (0 .. Level);
  end record;

  type Derived (Level : Index) is new Root (Level) with null record;

  type Child is new Derived (0) with record
    F : Arr (0 .. 100);
  end record;

  procedure Proc (A : access Child);

end Discr37;