Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / c2x-float-2.c
blob61a77f6f2db71cbe6b0fd806e1e7e55b49045207
1 /* Test INFINITY macro. Generic test. */
2 /* { dg-do run } */
3 /* { dg-options "-std=c2x -w" } */
4 /* { dg-add-options ieee } */
5 /* { dg-require-effective-target inff } */
7 #include <float.h>
9 #ifndef INFINITY
10 #error "INFINITY undefined"
11 #endif
13 extern void abort (void);
14 extern void exit (int);
16 int
17 main (void)
19 (void) _Generic (INFINITY, float : 0);
20 if (!(INFINITY >= FLT_MAX))
21 abort ();
22 exit (0);