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