* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / testsuite / gcc.dg / unordered-3.c
blob4a11a6d48d834caaf03cea6489e2c377fbc8cf2b
1 /* { dg-do link } */
3 void link_error ();
5 void test1()
7 if (__builtin_isgreater(1.0,__builtin_nan("")) != 0)
8 link_error ();
9 if (__builtin_isgreater(__builtin_nan(""),1.0) != 0)
10 link_error ();
12 if (__builtin_isgreaterequal(1.0,__builtin_nan("")) != 0)
13 link_error ();
14 if (__builtin_isgreaterequal(__builtin_nan(""),1.0) != 0)
15 link_error ();
17 if (__builtin_isless(1.0,__builtin_nan("")) != 0)
18 link_error ();
19 if (__builtin_isless(__builtin_nan(""),1.0) != 0)
20 link_error ();
22 if (__builtin_islessequal(1.0,__builtin_nan("")) != 0)
23 link_error ();
24 if (__builtin_islessequal(__builtin_nan(""),1.0) != 0)
25 link_error ();
27 if (__builtin_islessgreater(1.0,__builtin_nan("")) != 0)
28 link_error ();
29 if (__builtin_islessgreater(__builtin_nan(""),1.0) != 0)
30 link_error ();
32 if (__builtin_isunordered(1.0,__builtin_nan("")) == 0)
33 link_error ();
34 if (__builtin_isunordered(__builtin_nan(""),1.0) == 0)
35 link_error ();
39 void test2(double x)
41 if (__builtin_isgreater(x,__builtin_nan("")) != 0)
42 link_error ();
43 if (__builtin_isgreater(__builtin_nan(""),x) != 0)
44 link_error ();
46 if (__builtin_isgreaterequal(x,__builtin_nan("")) != 0)
47 link_error ();
48 if (__builtin_isgreaterequal(__builtin_nan(""),x) != 0)
49 link_error ();
51 if (__builtin_isless(x,__builtin_nan("")) != 0)
52 link_error ();
53 if (__builtin_isless(__builtin_nan(""),x) != 0)
54 link_error ();
56 if (__builtin_islessequal(x,__builtin_nan("")) != 0)
57 link_error ();
58 if (__builtin_islessequal(__builtin_nan(""),x) != 0)
59 link_error ();
61 if (__builtin_islessgreater(x,__builtin_nan("")) != 0)
62 link_error ();
63 if (__builtin_islessgreater(__builtin_nan(""),x) != 0)
64 link_error ();
66 if (__builtin_isunordered(x,__builtin_nan("")) == 0)
67 link_error ();
68 if (__builtin_isunordered(__builtin_nan(""),x) == 0)
69 link_error ();
73 int main()
75 test1 ();
76 test2 (1.0);
77 return 0;