Debian Codegraph @

gcc/testsuite/gnat.dg/discr22.adb

raw
1 -- { dg-do compile }
2 -- { dg-options "-gnatws" }
3
4 procedure Discr22 is
5
6 subtype Precision is Integer range 1 .. 5;
7
8 type Rec(D1 : Precision; D2 : Integer) is record
9 case D1 is
10 when 1 => I : Integer;
11 when others => null;
12 end case;
13 end record;
14 for Rec use record
15 D1 at 0 range 0 .. 7;
16 end record;
17
18 P : Precision;
19 X : Rec(P, 0);
20
21 begin
22 null;
23 end;