3 procedure Unchecked_Union2
is
4 type small_array
is array (0 .. 2) of Integer;
5 type big_array
is array (0 .. 3) of Integer;
7 type small_record
is record
8 field1
: aliased Integer := 0;
9 field2
: aliased small_array
:= (0, 0, 0);
12 type big_record
is record
13 field1
: aliased Integer := 0;
14 field2
: aliased big_array
:= (0, 0, 0, 0);
17 type myUnion
(discr
: Integer := 0) is record
20 record1
: aliased small_record
;
22 record2
: aliased big_record
;
26 type UU_myUnion3
(discr
: Integer := 0) is new myUnion
(discr
); -- Test
27 pragma Unchecked_Union
(UU_myUnion3
);
28 pragma Convention
(C
, UU_myUnion3
);
30 procedure Convert
(A
: in UU_myUnion3
; B
: out UU_myUnion3
);
31 pragma Import
(C
, Convert
);