diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2013-12-03 18:57:37 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2013-12-03 18:57:37 +0000 |
commit | b03fb8c9964613f37a05713ee03f4986c1565fb5 (patch) | |
tree | 1e3a6f8f58f805342bab310cb7bc975025fe4cb0 /gcc | |
parent | ba4fa5819f91c7e82eb08ff33fd61b106715a54e (diff) | |
download | gcc-b03fb8c9964613f37a05713ee03f4986c1565fb5.zip gcc-b03fb8c9964613f37a05713ee03f4986c1565fb5.tar.gz gcc-b03fb8c9964613f37a05713ee03f4986c1565fb5.tar.bz2 |
ibm-ldouble.c (__gcc_qadd): Fix add of normal number and qNaN to not raise an inexact exception.
libgcc/ChangeLog:
2013-12-03 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
* config/rs6000/ibm-ldouble.c (__gcc_qadd): Fix add
of normal number and qNaN to not raise an inexact exception.
gcc/testsuite/ChangeLog:
2013-12-03 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
* gcc.target/powerpc/pr57363.c: New test.
From-SVN: r205645
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr57363.c | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c1a0f54..2fea78d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2013-12-03 Adhemerval Zanella <azanella@linux.vnet.ibm.com> + + * gcc.target/powerpc/pr57363.c: New test. + 2013-12-03 Wei Mi <wmi@google.com> PR rtl-optimization/59020 diff --git a/gcc/testsuite/gcc.target/powerpc/pr57363.c b/gcc/testsuite/gcc.target/powerpc/pr57363.c new file mode 100644 index 0000000..45ea3f3 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr57363.c @@ -0,0 +1,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); +} |