Add _FloatN, _FloatNx tests for __builtin_fpclassify.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / float128-extend-nan.c
blob65dc520af7f2e0419ae1f6ab58daafd4d7bc8644
1 /* Test extensions to __float128 quiet signaling NaNs. */
2 /* { dg-do run } */
3 /* { dg-options "-fsignaling-nans" } */
4 /* { dg-require-effective-target __float128 } */
5 /* { dg-require-effective-target base_quadfloat_support } */
6 /* { dg-require-effective-target fenv_exceptions } */
7 /* { dg-add-options __float128 } */
9 #include <fenv.h>
10 #include <float.h>
11 #include <stdlib.h>
13 volatile long double a = __builtin_nansl ("");
15 int
16 main (void)
18 #if LDBL_MANT_DIG < 113
19 volatile __float128 r = a;
20 feclearexcept (FE_INVALID);
21 r += 1;
22 if (fetestexcept (FE_INVALID))
23 abort ();
24 #endif
25 exit (0);