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 } */ 8 9 #include <fenv.h> 10 #include <float.h> 11 #include <stdlib.h> 12 13 volatile long double a = __builtin_nansl (""); 14 15 int main(void)16main (void) 17 { 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); 26 } 27