summaryrefslogtreecommitdiff
path: root/libquadmath
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-01 08:55:33 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-01 08:55:33 +0000
commit25d7387838a36ff0636a5c27c019c7aabd20aaf3 (patch)
tree9f625e77a1aff1b0365afde48f24cdfe2e28ccf7 /libquadmath
parentceeb4318d0c3e65d4515f0bd98f454da29c0e74d (diff)
downloadgcc-25d7387838a36ff0636a5c27c019c7aabd20aaf3.tar.gz
* math/rem_pio2q.c (__quadmath_kernel_rem_pio2): Fix up fq to y
conversion for prec 3 and __FLT_EVAL_METHOD__ != 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176999 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libquadmath')
-rw-r--r--libquadmath/ChangeLog5
-rw-r--r--libquadmath/math/rem_pio2q.c18
2 files changed, 17 insertions, 6 deletions
diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog
index 522d68385a9..7b35cc985d7 100644
--- a/libquadmath/ChangeLog
+++ b/libquadmath/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-01 Jakub Jelinek <jakub@redhat.com>
+
+ * math/rem_pio2q.c (__quadmath_kernel_rem_pio2): Fix up fq to y
+ conversion for prec 3 and __FLT_EVAL_METHOD__ != 0.
+
2011-04-03 Tobias Burnus <burnus@net-b.de>
PR fortran/48311
diff --git a/libquadmath/math/rem_pio2q.c b/libquadmath/math/rem_pio2q.c
index a1c0b831ddb..47ee8ef2051 100644
--- a/libquadmath/math/rem_pio2q.c
+++ b/libquadmath/math/rem_pio2q.c
@@ -282,14 +282,20 @@ recompute:
break;
case 3: /* painful */
for (i=jz;i>0;i--) {
- fw = fq[i-1]+fq[i];
- fq[i] += fq[i-1]-fw;
- fq[i-1] = fw;
+#if __FLT_EVAL_METHOD__ != 0
+ volatile
+#endif
+ double fv = (double)(fq[i-1]+fq[i]);
+ fq[i] += fq[i-1]-fv;
+ fq[i-1] = fv;
}
for (i=jz;i>1;i--) {
- fw = fq[i-1]+fq[i];
- fq[i] += fq[i-1]-fw;
- fq[i-1] = fw;
+#if __FLT_EVAL_METHOD__ != 0
+ volatile
+#endif
+ double fv = (double)(fq[i-1]+fq[i]);
+ fq[i] += fq[i-1]-fv;
+ fq[i-1] = fv;
}
for (fw=0.0,i=jz;i>=2;i--) fw += fq[i];
if(ih==0) {