| 1 |
|
| 2 |
const double dnan = 1.0/0.0 - 1.0/0.0; |
| 3 |
double x = 1.0; |
| 4 |
|
| 5 |
extern void link_error (void); |
| 6 |
extern void abort (void); |
| 7 |
extern void exit (int); |
| 8 |
|
| 9 |
int |
| 10 |
main (void) |
| 11 |
{ |
| 12 |
#if ! defined (__vax__) && ! defined (_CRAY) |
| 13 |
/* NaN is an IEEE unordered operand. All these test should be false. */ |
| 14 |
if (dnan == dnan) |
| 15 |
link_error (); |
| 16 |
if (dnan != x) |
| 17 |
x = 1.0; |
| 18 |
else |
| 19 |
link_error (); |
| 20 |
|
| 21 |
if (dnan == x) |
| 22 |
link_error (); |
| 23 |
#endif |
| 24 |
exit (0); |
| 25 |
} |
| 26 |
|
| 27 |
#ifndef __OPTIMIZE__ |
| 28 |
void link_error (void) |
| 29 |
{ |
| 30 |
abort (); |
| 31 |
} |
| 32 |
#endif |
| 33 |
|