aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/powerpc/pr57363.c
blob: 45ea3f3fe61bd8f7160e2df3ac56adc5d27abf7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do run { target { powerpc*-*-linux* } } } */
/* { dg-options "-mlong-double-128" } */

/* Check if adding a qNAN and a normal long double does not generate a
   inexact exception.  */

#define _GNU_SOURCE
#include <fenv.h>

int main(void)
{
  double x = __builtin_nan ("");
  long double y = 1.1L;

  feenableexcept (FE_INEXACT);
  feclearexcept (FE_ALL_EXCEPT);
  x = x + y;
  return fetestexcept(FE_INEXACT);
}