1 /* Test SNAN macros. Runtime exceptions test, to verify NaN is
4 /* { dg-require-effective-target fenv_exceptions_double } */
5 /* { dg-options "-std=c23 -pedantic-errors -fsignaling-nans" } */
6 /* { dg-add-options ieee } */
11 /* This should be defined if and only if signaling NaNs is supported
12 for the given type. If the testsuite gains effective-target
13 support for targets not supporting signaling NaNs, this test
14 should be made appropriately conditional. */
16 #error "DBL_SNAN undefined"
19 volatile double d
= DBL_SNAN
;
21 extern void abort (void);
22 extern void exit (int);
27 feclearexcept (FE_ALL_EXCEPT
);
29 if (!fetestexcept (FE_INVALID
))