1 /* { dg-do run { target s390*-*-* } } */
2 /* { dg-options "-O0 -mlong-double-128" } */
8 check_ll (long double ld
, long long ll
)
10 if ((long long)ld
!= ll
)
12 printf ("ld: %Lf expect: %lld result: %lld\n",
13 ld
, ll
, (long long)ld
);
19 check_ull (long double ld
, unsigned long long ull
)
21 if ((unsigned long long)ld
!= ull
)
23 printf ("ld: %Lf expect: %llu result: %llu\n",
24 ld
, ull
, (unsigned long long)ld
);
32 const long long ll_max
= (long long)((1ULL << 63) - 1);
33 const long long ll_min
= -ll_max
- 1;
35 check_ll (206.23253, 206LL);
36 check_ull (206.23253, 206ULL);
37 check_ll ((long double)ll_max
, ll_max
);
38 check_ull ((long double)ll_max
, ll_max
);
39 check_ll ((long double)ll_min
, ll_min
);
43 check_ll ((long double)0xffffffffffffffffULL
, ll_max
);
44 check_ull ((long double)0xffffffffffffffffULL
, 0xffffffffffffffffULL
);