c++: Fix ICE with #embed/RAW_DATA_CST after list conversion [PR118671]
[official-gcc.git] / gcc / testsuite / gcc.dg / dfp / c23-float-dfp-6.c
blobd6b93a259ddb4964129f6154b03b72cf801ee6e4
1 /* Test DEC_NAN macro. Runtime exceptions test, to verify NaN is
2 quiet not signaling. (This would only actually fail for a
3 signaling NaN in the hardware DFP case, because the software DFP
4 support in libgcc does not integrate with hardware exceptions.) */
5 /* { dg-require-effective-target fenv_exceptions } */
6 /* { dg-options "-std=c23" } */
8 #include <fenv.h>
9 #include <float.h>
11 #ifndef DEC_NAN
12 # error "DEC_NAN not defined"
13 #endif
15 volatile _Decimal32 d = DEC_NAN;
17 extern void abort (void);
18 extern void exit (int);
20 int
21 main (void)
23 d += d;
24 if (fetestexcept (FE_INVALID))
25 abort ();
26 exit (0);