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