2 -- { dg-options "-gnatws" }
5 with Ada
.Unchecked_Conversion
;
9 type Arr
is array (1 .. Integer'Size) of Boolean;
11 for Arr
'Scalar_Storage_Order use System
.High_Order_First
;
13 function From_Float
is new Ada
.Unchecked_Conversion
(Float, Arr
);
14 function From_Int
is new Ada
.Unchecked_Conversion
(Integer, Arr
);
16 type R_Float
is record
19 for R_Float
'Bit_Order use System
.High_Order_First
;
20 for R_Float
'Scalar_Storage_Order use System
.High_Order_First
;
25 for R_Int
'Bit_Order use System
.High_Order_First
;
26 for R_Int
'Scalar_Storage_Order use System
.High_Order_First
;
28 F1
: Float := 1.234567;
31 for F2
'Address use FA
'Address;
32 pragma Import
(Ada
, F2
);
34 I1
: Integer := 1234567;
37 for I2
'Address use IA
'Address;
38 pragma Import
(Ada
, I2
);
41 -- Check that converting a FP value yields a big-endian array
42 FA
:= From_Float
(F1
);
47 -- Check that converting an integer value yields a big-endian array.