From: Jakub Jelinek Date: Mon, 1 Aug 2011 08:55:33 +0000 (+0200) Subject: rem_pio2q.c (__quadmath_kernel_rem_pio2): Fix up fq to y conversion for prec 3 and... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=57044b5af1c270378dd02087bb48c48cd6786d6e;p=gcc.git rem_pio2q.c (__quadmath_kernel_rem_pio2): Fix up fq to y conversion for prec 3 and __FLT_EVAL_METHOD__ != 0. * math/rem_pio2q.c (__quadmath_kernel_rem_pio2): Fix up fq to y conversion for prec 3 and __FLT_EVAL_METHOD__ != 0. From-SVN: r176999 --- 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 + + * 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 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) {