1 /* { dg-options "-O0" } */
3 /* N1150 5.4: Usual arithmetic conversions.
6 Test arithmetic operators with different decimal float types, and
7 between decimal float types and integer types. */
11 volatile _Decimal32 d32a
, d32b
, d32c
;
12 volatile _Decimal64 d64a
, d64b
, d64c
;
13 volatile _Decimal128 d128a
, d128b
, d128c
;
20 d64b
= 12.3456789012345e383dd
;
21 d128b
= 12345.6789012345678901e4000dl
;
35 /* Usual arithmetic conversions between decimal float types; addition. */
55 /* Usual arithmetic conversions between decimal float types;
76 /* Usual arithmetic conversions between decimal float and integer types. */
78 if (d32a
!= d32c
+ 2.0df
)
81 if (d32a
!= d32c
- 2.0df
)
84 if (d32a
!= d32c
+ d32c
)
87 if (d32a
!= d32c
/ 2.0df
)
91 if (d64a
!= d64c
+ 2.0dd
)
94 if (d64a
!= d64c
- 2.0dd
)
97 if (d64a
!= d64c
+ d64c
)
100 if (d64a
!= d64c
/ 2.0dd
)
104 if (d128a
!= d128c
+ 2.0dl
)
107 if (d128a
!= d128c
- 2.0dl
)
110 if (d128a
!= d128c
+ d128c
)
113 if (d128a
!= d128c
/ 2.0dl
)