If current mainline is used to compile GMP 4.2 on a Pentium4 with a standard
./configure; make; make check
one of GMP's checks fails:
make: Entering directory `/scratch/gmp-4.2/tests/mpz'
ERROR: incorrect plain product in test 53
op1 = -FFFFFFFFFFFFFFFFFFFFFFFFF...0000000000000000000000000 
op2 = 1FFFFFFFFFFFFFFFFFFFFFFFF...FFFFFFFFFFFFFFFFFFFFFFFFF 
product = -61EDD19F23160438880BD99C5...-6701F030DAFAEAD82176BAB51 
ref_product = -1FFFFFFFFFFFFFFFFFFFFFFFF...0000000000000000000000000 
Of course this may be a bug in GMP itself, but I could not reproduce this failure with gcc 4.1 or the head of the 4.1 branch
Can you try disabling VRP and enable -fwrapv and -fno-strict-aliasing? (I also see failures in other scientific codes with mainline)
(In reply to comment #1)
> Can you try disabling VRP and enable -fwrapv and -fno-strict-aliasing? (I also
> see failures in other scientific codes with mainline)
I reconfigured with
CFLAGS="-m32 -O2 -fomit-frame-pointer -mtune=pentium4 -march=pentium4 -fno-tree-vrp -fwrapv -fno-strict-aliasing" ./configure
but got the same result as before...
The failure appears to be connected to "-march=pentium4".
The lowest optimisation setting where I could reproduce it is
CFLAGS="-O1 -march=pentium4" ./configure
The test pass with "-O0 -march=pentium4".
We still need a self contained testcase to reproduce this issue.
(In reply to comment #4)
> We still need a self contained testcase to reproduce this issue.
I tried producing one, but it seems that this would take me much more time
than I can currently afford, especially since I'm not familiar with GMP.
The problem appears to have gone; I cannot reproduce it any more with current mainline.
*** This bug has been marked as a duplicate of 27671 ***