Index: lib/msun/src/s_fma.c =================================================================== --- lib/msun/src/s_fma.c +++ lib/msun/src/s_fma.c @@ -267,7 +267,9 @@ */ fesetround(oround); volatile double vzs = zs; /* XXX gcc CSE bug workaround */ - return (xy.hi + vzs + ldexp(xy.lo, spread)); + xs = ldexp(xy.lo, spread); + xy.hi += vzs; + return (xy.hi == 0 ? xs : xy.hi + xs); } if (oround != FE_TONEAREST) { Index: lib/msun/src/s_fmal.c =================================================================== --- lib/msun/src/s_fmal.c +++ lib/msun/src/s_fmal.c @@ -248,7 +248,9 @@ */ fesetround(oround); volatile long double vzs = zs; /* XXX gcc CSE bug workaround */ - return (xy.hi + vzs + ldexpl(xy.lo, spread)); + xs = ldexpl(xy.lo, spread); + xy.hi += vzs; + return (xy.hi == 0 ? xs : xy.hi + xs); } if (oround != FE_TONEAREST) {