Debian Codegraph @

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

raw
1 /* Test DEC_INFINITY defined in <float.h> with DFP support. */
2 /* { dg-options "-std=c23" } */
3
4 #include <float.h>
5
6 #ifndef DEC_INFINITY
7 # error "DEC_INFINITY not defined"
8 #endif
9
10 volatile _Decimal32 d = DEC_INFINITY;
11
12 extern void abort (void);
13 extern void exit (int);
14
15 int
16 main (void)
17 {
18 (void) _Generic (DEC_INFINITY, _Decimal32 : 0);
19 if (!(DEC_INFINITY > DEC32_MAX))
20 abort ();
21 if (!(d > DEC32_MAX))
22 abort ();
23 exit (0);
24 }