2 -- { dg-options "-gnatX" }
4 procedure AI12_0086_Example
is
5 type Enum
is (Aa
, Bb
, Cc
, Dd
, Ee
, Ff
, Gg
, Hh
, Ii
, Jj
, Kk
, Ll
, MM
,
6 Nn
, Oo
, Pp
, Qq
, Rr
, Ss
, Tt
, Uu
, Vv
, Ww
, Xx
, Yy
, Zz
);
7 subtype S
is Enum
range Dd
.. Hh
;
9 type Rec
(D
: Enum
) is record
11 when S
=> Foo
, Bar
: Integer;
16 function Make
(D
: S
) return Rec
is
18 return (D
=> D
, Foo
=> 123, Bar
=> 456); -- legal
21 if Make
(Ff
).Bar
/= 456 then
24 end AI12_0086_Example
;