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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [ieee/] [inf-1.c] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
extern void abort (void);
2
 
3
int main()
4
{
5
  float fi = __builtin_inff();
6
  double di = __builtin_inf();
7
  long double li = __builtin_infl();
8
 
9
  float fh = __builtin_huge_valf();
10
  double dh = __builtin_huge_val();
11
  long double lh = __builtin_huge_vall();
12
 
13
  if (fi + fi != fi)
14
    abort ();
15
  if (di + di != di)
16
    abort ();
17
  if (li + li != li)
18
    abort ();
19
 
20
  if (fi != fh)
21
    abort ();
22
  if (di != dh)
23
    abort ();
24
  if (li != lh)
25
    abort ();
26
 
27
  if (fi <= 0)
28
    abort ();
29
  if (di <= 0)
30
    abort ();
31
  if (li <= 0)
32
    abort ();
33
 
34
  return 0;
35
}

powered by: WebSVN 2.1.0

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