1 /* { dg-options "-w" } */
3 /* This test assumes IEEE float and double. */
5 #define __STDC_WANT_DEC_FP__
10 volatile _Decimal32 sd
;
11 volatile _Decimal64 dd
;
12 volatile _Decimal128 td
;
16 /* Check values that are too large for the result type. */
17 CONVERT_TO_PINF (301, sd
, sf
, 4.e
+38df
, f
)
18 CONVERT_TO_PINF (303, dd
, sf
, 4.e
+38dd
, f
)
19 CONVERT_TO_PINF (302, sd
, sf
, 9.9e+384df
, f
)
20 CONVERT_TO_PINF (304, dd
, sf
, 9.9e+384dd
, f
)
21 CONVERT_TO_PINF (305, td
, sf
, 4.e
+38dl
, f
)
22 CONVERT_TO_PINF (306, td
, sf
, 1.e
+39dl
, f
)
23 CONVERT_TO_MINF (311, sd
, sf
, -4.e
+38df
, f
)
24 CONVERT_TO_MINF (312, dd
, sf
, -4.e
+38dd
, f
)
25 CONVERT_TO_MINF (313, sd
, sf
, -9.9e+384df
, f
)
26 CONVERT_TO_MINF (314, dd
, sf
, -9.9e+384dd
, f
)
27 CONVERT_TO_MINF (315, td
, sf
, -4.e
+38dl
, f
)
28 CONVERT_TO_MINF (316, td
, sf
, -1.e
+39dl
, f
)
30 CONVERT_TO_PINF (321, dd
, df
, 1.8e+308dd
,)
31 CONVERT_TO_PINF (322, dd
, df
, 9.9e+384dd
,)
32 CONVERT_TO_PINF (323, td
, df
, 1.8e+308dl
,)
33 CONVERT_TO_PINF (324, td
, df
, 9.9e+384dl
,)
34 CONVERT_TO_PINF (325, dd
, df
, 1.e309dd
,)
35 CONVERT_TO_PINF (326, td
, df
, 1.e309dl
,)
36 CONVERT_TO_MINF (331, dd
, df
, -1.8e+308dd
,)
37 CONVERT_TO_MINF (332, dd
, df
, -9.9e+384dd
,)
38 CONVERT_TO_MINF (333, td
, df
, -1.8e+308dl
,)
39 CONVERT_TO_MINF (334, td
, df
, -9.9e+384dl
,)
40 CONVERT_TO_MINF (335, dd
, df
, -1.e309dd
,)
41 CONVERT_TO_MINF (336, td
, df
, -1.e309dl
,)
43 CONVERT_TO_PINF (341, df
, sd
, 1.0e+97, d32
)
44 CONVERT_TO_PINF (342, df
, sd
, 1.6e+308, d32
)
45 CONVERT_TO_MINF (351, df
, sd
, -1.0e+97, d32
)
46 CONVERT_TO_MINF (352, df
, sd
, -1.6e+308, d32
)