2 -- { dg-options "-gnatws" }
4 with Ada
.Unchecked_Conversion
;
6 procedure Unchecked_Convert1
is
10 type Stream
is array (Natural range <>) of Byte
;
16 function Do_Sum
(R
: Rec
) return Integer is
21 function Sum
(S
: Stream
) return Integer is
22 subtype Chunk
is Stream
(1 .. Rec
'Size / 8);
23 function To_Chunk
is new Ada
.Unchecked_Conversion
(Chunk
, Rec
);
25 return Do_Sum
(To_Chunk
(S
(S
'First .. S
'First + Rec
'Size / 8 - 1)));
28 A
: Stream
(1..9) := (others => 0);