gmp-4.2 check failure with experimental gcc
Torbjorn Granlund
tege at swox.com
Thu Apr 27 12:29:28 CEST 2006
Martin Reinecke <martin at MPA-Garching.MPG.DE> writes:
when gmp-4.2 is compiled with the current experimental version of gcc 4.2
on a Pentium 4 (pentium4-pc-linux-gnu/i686-pc-linux-gnu),
the test t-mul in the mpz/ directory fails:
/scratch/gmp-4.2/tests/mpz>./t-mul
ERROR: incorrect plain product in test 53
op1 = -FFFFFFFFFFFFFFFFFFFFFFFFF...0000000000000000000000000 [71992]
op2 = 1FFFFFFFFFFFFFFFFFFFFFFFF...FFFFFFFFFFFFFFFFFFFFFFFFF [202386]
product = -61EDD19F23160438880BD99C5...-6701F030DAFAEAD82176BAB51 [274384]
ref_product = -1FFFFFFFFFFFFFFFFFFFFFFFF...0000000000000000000000000 [274378]
Abort
GMP was configured and compiled with a simple "./configure; make; make check"
This problem does not occur with gcc 4.1 and the head of the gcc 4.1-branch.
It appears to be related to processor-specific optimisation; the minimum set
of optimisation flags which trigger the bug appears to be "-O1 -march=pentium4".
Since it is very likely that this is a bug in gcc and not in GMP, I filed a bug report
there (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27322).
On the other hand, the gcc developers would like to see a standalone testcase
that demonstrates the bug, which is very hard for me to provide, since I'm not
familiar with GMP at all. Could you please give me a hint from which GMP files
this particular test case depends, so that I can try to build a single-file
testcase? Or do you have an idea how this could be done more easily?
This would quite likely be mpn/generic/mul_fft.c. This complex
file is often miscompiled.
--
Torbjörn
More information about the gmp-bugs
mailing list