Bug 27322 - Problem when compiling GMP 4.2 with current mainline
Summary: Problem when compiling GMP 4.2 with current mainline
Status: RESOLVED DUPLICATE of bug 27671
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-26 10:01 UTC by Martin Reinecke
Modified: 2006-05-29 16:09 UTC (History)
4 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Reinecke 2006-04-26 10:01:39 UTC
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[4]: Entering directory `/scratch/gmp-4.2/tests/mpz'
PASS: t-addsub
PASS: t-cmp
ERROR: incorrect plain product in test 53
op1          = -FFFFFFFFFFFFFFFFFFFFFFFFF...0000000000000000000000000 [71992]
op2          = 1FFFFFFFFFFFFFFFFFFFFFFFF...FFFFFFFFFFFFFFFFFFFFFFFFF [202386]
    product  = -61EDD19F23160438880BD99C5...-6701F030DAFAEAD82176BAB51 [274384]
ref_product  = -1FFFFFFFFFFFFFFFFFFFFFFFF...0000000000000000000000000 [274378]
FAIL: t-mul
PASS: t-mul_i
PASS: t-tdiv
[...]

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
Comment 1 Richard Biener 2006-04-26 12:02:01 UTC
Can you try disabling VRP and enable -fwrapv and -fno-strict-aliasing?  (I also see failures in other scientific codes with mainline)
Comment 2 Martin Reinecke 2006-04-26 12:14:23 UTC
(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...
Comment 3 Martin Reinecke 2006-04-26 13:22:31 UTC
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".
Comment 4 Andrew Pinski 2006-04-26 15:50:06 UTC
We still need a self contained testcase to reproduce this issue.
Comment 5 Martin Reinecke 2006-05-03 09:46:17 UTC
(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.
Sorry...
Comment 6 Martin Reinecke 2006-05-29 12:24:40 UTC
The problem appears to have gone; I cannot reproduce it any more with current mainline.
Comment 7 Andrew Pinski 2006-05-29 16:09:51 UTC

*** This bug has been marked as a duplicate of 27671 ***