2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / ieee / fp-cmp-6.c
blob782455831b0fbede529678d6fb8925b576e9ddea
2 const double dnan = 1.0/0.0 - 1.0/0.0;
3 double x = 1.0;
5 extern void link_error (void);
6 extern void abort (void);
8 main ()
10 #if ! defined (__vax__) && ! defined (_CRAY)
11 /* NaN is an IEEE unordered operand. All these test should be false. */
12 if (dnan == dnan)
13 link_error ();
14 if (dnan != x)
15 x = 1.0;
16 else
17 link_error ();
19 if (dnan < x)
20 link_error ();
21 if (dnan > x)
22 link_error ();
23 if (dnan <= x)
24 link_error ();
25 if (dnan >= x)
26 link_error ();
27 if (dnan == x)
28 link_error ();
29 #endif
30 exit (0);
33 #ifndef __OPTIMIZE__
34 void link_error (void)
36 abort ();
38 #endif