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 /libgcc/config/rs6000/ibm-ldouble.c | |
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 'libgcc/config/rs6000/ibm-ldouble.c')
-rw-r--r-- | libgcc/config/rs6000/ibm-ldouble.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgcc/config/rs6000/ibm-ldouble.c b/libgcc/config/rs6000/ibm-ldouble.c index 28e02e9..7ca900c 100644 --- a/libgcc/config/rs6000/ibm-ldouble.c +++ b/libgcc/config/rs6000/ibm-ldouble.c @@ -104,6 +104,8 @@ __gcc_qadd (double a, double aa, double c, double cc) if (nonfinite (z)) { + if (fabs (z) != inf()) + return z; z = cc + aa + c + a; if (nonfinite (z)) return z; |