PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gnat.dg / discr7.adb
blob3bb61cb12b694b5cb5ce7a941b28b1ac522965a1
1 -- { dg-do compile }
3 procedure Discr7 is
5 subtype Index is Natural range 0..5;
6 type BitString is array(Index range <>) of Boolean;
7 pragma Pack(BitString);
9 function Id (I : Integer) return Integer is
10 begin
11 return I;
12 end;
14 type E(D : Index) is record
15 C : BitString(1..D);
16 end record;
18 subtype E0 is E(Id(0));
20 function F return E0 is
21 begin
22 return E'(D=>0, C=>(1..0=>FALSE));
23 end;
25 begin
26 null;
27 end;