1 /* Test for correct rounding of conversions from __int128 to
4 /* { dg-require-effective-target __float128 } */
5 /* { dg-require-effective-target base_quadfloat_support } */
6 /* { dg-require-effective-target int128 } */
7 /* { dg-options "-frounding-math" } */
8 /* { dg-add-options __float128 } */
16 volatile unsigned long long h
= -1ULL;
17 volatile unsigned __int128 u128
= (((unsigned __int128
) h
) << 64) | h
;
18 volatile __int128 s128
= u128
>> 1;
19 fesetround (FE_TOWARDZERO
);
20 __float128 ru
= u128
, rs
= s128
;
21 if (ru
!= 0x1.ffffffffffffffffffffffffffffp127q
)
23 if (rs
!= 0x1.ffffffffffffffffffffffffffffp126q
)