aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/discr10.ads
blob: 8df7ef146c48fc4676f064d3fd2733fd78142349 (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 Discr10 is

   subtype Index is Natural range 0 .. 150;

   type List is array (Index range <>) of Integer;

   type R (D1 : Boolean := True; D2 : Boolean := False; D3 : Index := 0) is
   record
      case D2 is
         when True =>
            L : List (1 .. D3);
            case D1 is
               when True => I : Integer;
               when False => null;
            end case;
         when False =>
            null;
      end case;
   end record;

   function Get (X : R) return R;

end Discr10;