Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / fixuns-trunc-1.c
blob0d0942952497ab6ba2afbc65085ce70c1d71dc3e
1 /* { dg-do run } */
2 /* { dg-options "-std=c99" } */
4 unsigned long foo(double d)
6 return (unsigned long) d;
9 extern void abort(void);
11 int main(void)
13 double d;
14 unsigned long l;
16 #ifdef __LP64__
17 d = 9223372036854775808.7;
18 l = 1LL << 63;
20 if (foo(d) != l)
21 abort();
22 #endif
24 d = 122485.2;
25 l = 122485;
27 if (foo(d) != l)
28 abort();
30 return 0;