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/] [inf-1.c] - Blame information for rev 774

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

Line No. Rev Author Line
1 688 jeremybenn
extern void abort (void);
2
 
3
int main()
4
{
5
#ifndef __SPU__
6
  /* The SPU single-precision floating point format does not support Inf.  */
7
  float fi = __builtin_inff();
8
#endif
9
  double di = __builtin_inf();
10
  long double li = __builtin_infl();
11
 
12
  float fh = __builtin_huge_valf();
13
  double dh = __builtin_huge_val();
14
  long double lh = __builtin_huge_vall();
15
 
16
#ifndef __SPU__
17
  if (fi + fi != fi)
18
    abort ();
19
#endif
20
  if (di + di != di)
21
    abort ();
22
  if (li + li != li)
23
    abort ();
24
 
25
#ifndef __SPU__
26
  if (fi != fh)
27
    abort ();
28
#endif
29
  if (di != dh)
30
    abort ();
31
  if (li != lh)
32
    abort ();
33
 
34
#ifndef __SPU__
35
  if (fi <= 0)
36
    abort ();
37
#endif
38
  if (di <= 0)
39
    abort ();
40
  if (li <= 0)
41
    abort ();
42
 
43
  return 0;
44
}

powered by: WebSVN 2.1.0

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