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] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-options "" } */
2
 
3
/* FIXME: this test needs to be conditional to systems with POSIX signals.  */
4
 
5
#include <signal.h>
6
 
7
extern void exit(int status);
8
extern void abort(void);
9
 
10
void go_quietly (int arg)
11
{
12
  exit (0);
13
}
14
 
15
int main()
16
{
17
  _Decimal32 d = 1.5df;
18
 
19
  /* Enable signaling NaNs using a scaffolding libgcc function.  */
20
  __dfp_enable_traps ();
21
  signal (SIGFPE, go_quietly);
22
 
23
  d = d / 0.0df;
24
 
25
  /* Never reached.  */
26
  abort ();
27
  return 0;
28
}

powered by: WebSVN 2.1.0

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