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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [compare-rel-const.c] - Blame information for rev 856

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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