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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [snan.c] - Rev 149

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

/* { dg-options "" } */
 
/* FIXME: this test needs to be conditional to systems with POSIX signals.  */
 
#include <signal.h>
 
extern void exit(int status);
extern void abort(void);
 
void go_quietly (int arg)
{
  exit (0);
}
 
int main()
{
  _Decimal32 d = 1.5df;
 
  /* Enable signaling NaNs using a scaffolding libgcc function.  */
  __dfp_enable_traps ();
  signal (SIGFPE, go_quietly);
 
  d = d / 0.0df;
 
  /* Never reached.  */
  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.