OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [unordered-3.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do link } */
2
 
3
void link_error ();
4
 
5
void test1()
6
{
7
  if (__builtin_isgreater(1.0,__builtin_nan("")) != 0)
8
    link_error ();
9
  if (__builtin_isgreater(__builtin_nan(""),1.0) != 0)
10
    link_error ();
11
 
12
  if (__builtin_isgreaterequal(1.0,__builtin_nan("")) != 0)
13
    link_error ();
14
  if (__builtin_isgreaterequal(__builtin_nan(""),1.0) != 0)
15
    link_error ();
16
 
17
  if (__builtin_isless(1.0,__builtin_nan("")) != 0)
18
    link_error ();
19
  if (__builtin_isless(__builtin_nan(""),1.0) != 0)
20
    link_error ();
21
 
22
  if (__builtin_islessequal(1.0,__builtin_nan("")) != 0)
23
    link_error ();
24
  if (__builtin_islessequal(__builtin_nan(""),1.0) != 0)
25
    link_error ();
26
 
27
  if (__builtin_islessgreater(1.0,__builtin_nan("")) != 0)
28
    link_error ();
29
  if (__builtin_islessgreater(__builtin_nan(""),1.0) != 0)
30
    link_error ();
31
 
32
  if (__builtin_isunordered(1.0,__builtin_nan("")) == 0)
33
    link_error ();
34
  if (__builtin_isunordered(__builtin_nan(""),1.0) == 0)
35
    link_error ();
36
}
37
 
38
 
39
void test2(double x)
40
{
41
  if (__builtin_isgreater(x,__builtin_nan("")) != 0)
42
    link_error ();
43
  if (__builtin_isgreater(__builtin_nan(""),x) != 0)
44
    link_error ();
45
 
46
  if (__builtin_isgreaterequal(x,__builtin_nan("")) != 0)
47
    link_error ();
48
  if (__builtin_isgreaterequal(__builtin_nan(""),x) != 0)
49
    link_error ();
50
 
51
  if (__builtin_isless(x,__builtin_nan("")) != 0)
52
    link_error ();
53
  if (__builtin_isless(__builtin_nan(""),x) != 0)
54
    link_error ();
55
 
56
  if (__builtin_islessequal(x,__builtin_nan("")) != 0)
57
    link_error ();
58
  if (__builtin_islessequal(__builtin_nan(""),x) != 0)
59
    link_error ();
60
 
61
  if (__builtin_islessgreater(x,__builtin_nan("")) != 0)
62
    link_error ();
63
  if (__builtin_islessgreater(__builtin_nan(""),x) != 0)
64
    link_error ();
65
 
66
  if (__builtin_isunordered(x,__builtin_nan("")) == 0)
67
    link_error ();
68
  if (__builtin_isunordered(__builtin_nan(""),x) == 0)
69
    link_error ();
70
}
71
 
72
 
73
int main()
74
{
75
  test1 ();
76
  test2 (1.0);
77
  return 0;
78
}
79
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.