summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/unordered-2.c
blob: 0696d37cfb40c5aeaed6af81e27a53231f83ca1c (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
40
41
42
43
44
45
46
47
48
49
50
51
/* { dg-do link } */

void link_error ();

int main()
{
  if (__builtin_isgreater(1.0,2.0) != 0)
    link_error ();
  if (__builtin_isgreater(3.0,3.0) != 0)
    link_error ();
  if (__builtin_isgreater(5.0,4.0) == 0)
    link_error ();

  if (__builtin_isgreaterequal(1.0,2.0) != 0)
    link_error ();
  if (__builtin_isgreaterequal(3.0,3.0) == 0)
    link_error ();
  if (__builtin_isgreaterequal(5.0,4.0) == 0)
    link_error ();

  if (__builtin_isless(1.0,2.0) == 0)
    link_error ();
  if (__builtin_isless(3.0,3.0) != 0)
    link_error ();
  if (__builtin_isless(5.0,4.0) != 0)
    link_error ();

  if (__builtin_islessequal(1.0,2.0) == 0)
    link_error ();
  if (__builtin_islessequal(3.0,3.0) == 0)
    link_error ();
  if (__builtin_islessequal(5.0,4.0) != 0)
    link_error ();

  if (__builtin_islessgreater(1.0,2.0) == 0)
    link_error ();
  if (__builtin_islessgreater(3.0,3.0) != 0)
    link_error ();
  if (__builtin_islessgreater(5.0,4.0) == 0)
    link_error ();

  if (__builtin_isunordered(1.0,2.0) != 0)
    link_error ();
  if (__builtin_isunordered(3.0,3.0) != 0)
    link_error ();
  if (__builtin_isunordered(5.0,4.0) != 0)
    link_error ();

  return 0;
}