1 /* C99 6.5.8 Relational operators.
2 Compare decimal float constants against each other. */
3
4 extern void link_error (void);
5
6 int
main()7 main ()
8 {
9 /* Compare like-typed negative constants. */
10 if (-2.0dl < -2.0dl)
11 link_error ();
12
13 /* Compare like-typed constants. */
14 if (-2.0dl >= .01dl)
15 link_error ();
16
17 /* Compare like-typed constants. */
18 if (0.2dd > 0.02e1dd)
19 link_error ();
20
21 /* Compare decimal float constants of different types. */
22 if (-.000005dd >= -.0000049DL)
23 link_error();
24
25 /* Test use gcc builtins for comparisons. */
26 if (__builtin_isless(-2.0dl,-2.0dl))
27 link_error();
28
29 if (__builtin_isgreaterequal(-2.0dl,.01dl))
30 link_error();
31
32 if (!(__builtin_islessequal(-2.0dl, -2.0dd)))
33 link_error();
34
35 if (!(__builtin_isgreater(2.0dl, -2.0dd)))
36 link_error();
37
38 if (__builtin_islessequal(2.0df, __builtin_nand64("")))
39 link_error();
40
41 if (__builtin_islessgreater(2.0dd, __builtin_nand64("")))
42 link_error();
43
44 if (!__builtin_islessgreater(2.0dd, -2.0dd))
45 link_error();
46
47 if (!__builtin_islessgreater(-3.0dd, 2.0dd))
48 link_error();
49
50 if (__builtin_isunordered(1.1df, 0.003dd))
51 link_error();
52
53 if (!__builtin_isunordered(-3.1df, __builtin_nand32("")))
54 link_error();
55
56 return 0;
57 }
58