Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-float-3.c
blob23ab80f351aad3c016bf56ca86dedc42b62aa34c
1 /* Test INFINITY macro. Test when infinities supported. */
2 /* { dg-do run } */
3 /* { dg-options "-std=c23 -pedantic-errors" } */
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 volatile float f = INFINITY;
15 extern void abort (void);
16 extern void exit (int);
18 int
19 main (void)
21 (void) _Generic (INFINITY, float : 0);
22 if (!(INFINITY > FLT_MAX))
23 abort ();
24 if (!(f > FLT_MAX))
25 abort ();
26 exit (0);