OSDN Git Service

* gcc.c-torture/execute/20040208-2.c: Move ...
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / execute / cvt-1.c
1 static inline long
2 g1 (double x)
3 {
4   return (double) (long) x;
5 }
6
7 long
8 g2 (double f)
9 {
10   return f;
11 }
12
13 double
14 f (long i)
15 {
16   if (g1 (i) != g2 (i))
17     abort ();
18   return g2 (i);
19 }
20
21 main ()
22 {
23   if (f (123456789L) != 123456789L)
24     abort ();
25   if (f (123456789L) != g2 (123456789L))
26     abort ();
27   exit (0);
28 }