OSDN Git Service

* gnat.dg/bit_packed_array5.ads: Move dg directive to...
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gnat.dg / discr7.adb
1 -- { dg-do compile }
2
3 procedure Discr7 is
4
5   subtype Index is Natural range 0..5;
6   type BitString is array(Index range <>) of Boolean;
7   pragma Pack(BitString);
8
9   function Id (I : Integer) return Integer is
10   begin
11     return I;
12   end;
13
14   type E(D : Index) is record
15     C : BitString(1..D);
16   end record;
17
18   subtype E0 is E(Id(0));
19
20   function F return E0 is
21   begin
22     return E'(D=>0, C=>(1..0=>FALSE));
23   end;
24
25 begin
26   null;
27 end;