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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [unordered-3.c] - Blame information for rev 298

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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