Merge from trunk
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / pr57363.c
blob45ea3f3fe61bd8f7160e2df3ac56adc5d27abf7f
1 /* { dg-do run { target { powerpc*-*-linux* } } } */
2 /* { dg-options "-mlong-double-128" } */
4 /* Check if adding a qNAN and a normal long double does not generate a
5 inexact exception. */
7 #define _GNU_SOURCE
8 #include <fenv.h>
10 int main(void)
12 double x = __builtin_nan ("");
13 long double y = 1.1L;
15 feenableexcept (FE_INEXACT);
16 feclearexcept (FE_ALL_EXCEPT);
17 x = x + y;
18 return fetestexcept(FE_INEXACT);