make check fails with -O2 on powerpc64-linux and powerpc-linux with gcc-4.1 Works ok with gcc-4.0, and also with 4.1 and -O1. ppc64: make[2]: *** [/usr/src/packages/BUILD/glibc-2.3/cc-nptl/math/test-float.out] Error 1 make[2]: *** [/usr/src/packages/BUILD/glibc-2.3/cc-nptl/math/test-double.out] Error 1 make[2]: *** [/usr/src/packages/BUILD/glibc-2.3/cc-nptl/math/test-ifloat.out] Error 1 make[2]: *** [/usr/src/packages/BUILD/glibc-2.3/cc-nptl/math/test-idouble.out] Error 1 make[1]: *** [math/tests] Error 2 ppc: make[2]: *** [/usr/src/packages/BUILD/glibc-2.3/cc-nptl/math/test-float.out] Error 1 make[1]: *** [math/tests] Error 2 (make check runs without -k on ppc, the failure rate might be the same as on ppc64). Will post details and possible a testcase, later.
Created attachment 10226 [details] pr24819-failure.txt make check errors on powerpc-linux
Waiting for a testcase.
I analysed one of these failures quite a while ago. The conclusion I came to was that the errors were due to excess precision. gcc-4.1 makes more use of multiply-accumulate instructions. You could try compiling glibc with -mno-fused-madd.
Marking as invalid given my previous analysis, and that the errors are all 1ulp.
Another failure from glibc's tests is more severe: __DBL_MAX__ * __DBL_MAX__ - __DBL_MAX * __DBL_MAX__ is turned into an INF rather than a NAN (as would happen on most targets) or zero (as would happen on x87 because it computes everything in long double). This can be seen with a program like extern void abort (void) { double nan = __DBL_MAX__ * __DBL_MAX__ - __DBL_MAX * __DBL_MAX__; if (nan == nan && nan != 0.0) abort (); } This seems more serious, to the point that fused multiply-add instructions should be disabled unless !HONOR_NANS || !MODE_HAS_INFINITIES for the given mode. CCing Eric since he recently had problems with ia64 fma (http://gcc.gnu.org/ml/gcc/2005-10/msg01036.html).
CCing Eric since he recently had problems with ia64 fma (http://gcc.gnu.org/ml/gcc/2005-10/msg01036.html).