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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr39228.c] - Blame information for rev 749

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
static int __attribute__((always_inline)) testf (float b)
4
{
5
  float c = 1.01f * b;
6
 
7
  return __builtin_isinff (c);
8
}
9
 
10
static int __attribute__((always_inline)) test (double b)
11
{
12
  double c = 1.01 * b;
13
 
14
  return __builtin_isinf (c);
15
}
16
 
17
static int __attribute__((always_inline)) testl (long double b)
18
{
19
  long double c = 1.01L * b;
20
 
21
  return __builtin_isinfl (c);
22
}
23
 
24
int main()
25
{
26
  if (testf (__FLT_MAX__) < 1)
27
    abort ();
28
 
29
  if (test (__DBL_MAX__) < 1)
30
    abort ();
31
 
32
  if (testl (__LDBL_MAX__) < 1)
33
    abort ();
34
 
35
  return 0;
36
}

powered by: WebSVN 2.1.0

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