aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gnat.dg/discr5.adb
blob: 631db55dba0706db96e775be7ff850f3d59a2e84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- { dg-do compile }

procedure Discr5 is

   type Enum is (Ten, Twenty);
   for Enum use (10, 20);
   type Arr is array (Enum range <>) of Integer;
   type Rec (Discr: Enum := Ten) is record
      case Discr is
         when others =>
            A: Arr (Ten .. Discr);
      end case;
   end record;

begin
   null;
end;