Merge from mainline
[official-gcc.git] / gcc / testsuite / gcc.dg / dfp / snan.c
blobefc6e70ee83bb631e37823dbd1ea8b7ad164ed9b
1 /* { dg-options "" } */
3 /* FIXME: this test needs to be conditional to systems with POSIX signals. */
5 #include <signal.h>
7 extern void exit(int status);
8 extern void abort(void);
10 void go_quietly (int arg)
12 exit (0);
15 int main()
17 _Decimal32 d = 1.5df;
19 /* Enable signaling NaNs using a scaffolding libgcc function. */
20 __dfp_enable_traps ();
21 signal (SIGFPE, go_quietly);
23 d = d / 0.0df;
25 /* Never reached. */
26 abort ();
27 return 0;