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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [ieee/] [fp-cmp-6.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 688 jeremybenn
 
2
const double dnan = 1.0/0.0 - 1.0/0.0;
3
double x = 1.0;
4
 
5
extern void link_error (void);
6
extern void abort (void);
7
 
8
main ()
9
{
10
#if ! defined (__vax__) && ! defined (_CRAY)
11
  /* NaN is an IEEE unordered operand.  All these test should be false.  */
12
  if (dnan == dnan)
13
    link_error ();
14
  if (dnan != x)
15
    x = 1.0;
16
  else
17
    link_error ();
18
 
19
  if (dnan < x)
20
    link_error ();
21
  if (dnan > x)
22
    link_error ();
23
  if (dnan <= x)
24
    link_error ();
25
  if (dnan >= x)
26
    link_error ();
27
  if (dnan == x)
28
    link_error ();
29
#endif
30
  exit (0);
31
}
32
 
33
#ifndef __OPTIMIZE__
34
void link_error (void)
35
{
36
  abort ();
37
}
38
#endif
39
 

powered by: WebSVN 2.1.0

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