Debian Codegraph @

gcc/testsuite/gcc.dg/dfp/c23-float-dfp-5.c

raw
1 /* Test DEC_NAN defined in <float.h> with DFP support. */
2 /* { dg-options "-std=c23" } */
3
4 #include <float.h>
5
6 #ifndef DEC_NAN
7 # error "DEC_NAN not defined"
8 #endif
9
10 volatile _Decimal32 d = DEC_NAN;
11
12 extern void abort (void);
13 extern void exit (int);
14
15 int
16 main (void)
17 {
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);
24 }