1 /* { dg-options "-O0 -mlong-double-128" } */
7 check_ll (long double ld
, long long ll
)
9 if ((long long)ld
!= ll
)
11 printf ("ld: %Lf expect: %lld result: %lld\n",
12 ld
, ll
, (long long)ld
);
18 check_ull (long double ld
, unsigned long long ull
)
20 if ((unsigned long long)ld
!= ull
)
22 printf ("ld: %Lf expect: %llu result: %llu\n",
23 ld
, ull
, (unsigned long long)ld
);
31 const long long ll_max
= (long long)((1ULL << 63) - 1);
32 const long long ll_min
= -ll_max
- 1;
34 check_ll (206.23253, 206LL);
35 check_ull (206.23253, 206ULL);
36 check_ll ((long double)ll_max
, ll_max
);
37 check_ull ((long double)ll_max
, ll_max
);
38 check_ll ((long double)ll_min
, ll_min
);
42 check_ll ((long double)0xffffffffffffffffULL
, ll_max
);
43 check_ull ((long double)0xffffffffffffffffULL
, 0xffffffffffffffffULL
);