From e7b0a63c190c7ecb475b09f41387a75952540f49 Mon Sep 17 00:00:00 2001 From: das Date: Mon, 27 May 2013 08:50:10 +0000 Subject: Fix some regressions caused by the switch from gcc to clang. The fixes are workarounds for various symptoms of the problem described in clang bugs 3929, 8100, 8241, 10409, and 12958. The regression tests did their job: they failed, someone brought it up on the mailing lists, and then the issue got ignored for 6 months. Oops. There may still be some regressions for functions we don't have test coverage for yet. --- lib/msun/src/e_log10.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/msun/src/e_log10.c') diff --git a/lib/msun/src/e_log10.c b/lib/msun/src/e_log10.c index 104d257..a795129 100644 --- a/lib/msun/src/e_log10.c +++ b/lib/msun/src/e_log10.c @@ -34,6 +34,7 @@ log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */ log10_2lo = 3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */ static const double zero = 0.0; +static volatile double vzero = 0.0; double __ieee754_log10(double x) @@ -47,7 +48,7 @@ __ieee754_log10(double x) k=0; if (hx < 0x00100000) { /* x < 2**-1022 */ if (((hx&0x7fffffff)|lx)==0) - return -two54/zero; /* log(+-0)=-inf */ + return -two54/vzero; /* log(+-0)=-inf */ if (hx<0) return (x-x)/zero; /* log(-#) = NaN */ k -= 54; x *= two54; /* subnormal number, scale up x */ GET_HIGH_WORD(hx,x); -- cgit v1.1