c++: trait as typename scope [PR116052]
[official-gcc.git] / gcc / testsuite / gcc.dg / dfp / c23-float-dfp-5.c
blob926649cbf17f74e2dc59b91ac0ef3a6c143d4d94
1 /* Test DEC_NAN defined in <float.h> with DFP support. */
2 /* { dg-options "-std=c23" } */
4 #include <float.h>
6 #ifndef DEC_NAN
7 # error "DEC_NAN not defined"
8 #endif
10 volatile _Decimal32 d = DEC_NAN;
12 extern void abort (void);
13 extern void exit (int);
15 int
16 main (void)
18 (void) _Generic (DEC_NAN, _Decimal32 : 0);
19 if (!__builtin_isnan (DEC_NAN))
20 abort ();
21 if (!__builtin_isnan (d))
22 abort ();
23 exit (0);