OSDN Git Service

gcc/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / pr32268.c
1 /* { dg-do run { target *-*-linux* } } */
2 /* { dg-require-effective-target lp64 } */
3 /* { dg-options "-O2" } */
4
5 extern void abort(void);
6
7 int __attribute__ ((__noinline__))
8 test_lt(__float128 x, __float128 y)
9 {
10   return x < y;
11 }
12
13 int __attribute__ ((__noinline__))
14 test_gt (__float128 x, __float128 y)
15 {
16   return x > y;
17 }
18
19 int main()
20 {
21   __float128 a = 0.0;
22   __float128 b = 1.0;
23
24   int r;
25
26   r = test_lt (a, b);
27   if (r != ((double) a < (double) b))
28     abort();
29
30   r = test_gt (a, b);
31   if (r != ((double) a > (double) b))
32     abort();
33
34   return 0;
35 }