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] - Rev 774

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

extern void abort (void);
 
static int __attribute__((always_inline)) testf (float b)
{
  float c = 1.01f * b;
 
  return __builtin_isinff (c);
}
 
static int __attribute__((always_inline)) test (double b)
{
  double c = 1.01 * b;
 
  return __builtin_isinf (c);
}
 
static int __attribute__((always_inline)) testl (long double b)
{
  long double c = 1.01L * b;
 
  return __builtin_isinfl (c);
}
 
int main()
{
  if (testf (__FLT_MAX__) < 1)
    abort ();
 
  if (test (__DBL_MAX__) < 1)
    abort ();
 
  if (testl (__LDBL_MAX__) < 1)
    abort ();
 
  return 0;
}
 

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

powered by: WebSVN 2.1.0

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