gmp-4.1.3-rc1 ... p5 gcc 2.95 -O3

Kevin Ryde user42 at zip.com.au
Sat Apr 24 22:49:55 CEST 2004


David Newman <david.newman at jesus.ox.ac.uk> writes:
>
> I've had a few problems compiling with -O3, are these known?

The only problems are unknown.

> pentium-pc-linux-gnu (P200) running gcc 2.95 and configured with
> --enable-mpfr CFLAGS="-O3 -march=pentium -fomit-frame-pointer" ::
> failed as follows:

I don't get that with recent debian 2.95.4.

> ERROR: mpz_add or mpz_sub incorrect in test 729
> op1 =
> 1FFFFFE00003E0000007FFF000000000001FFFFFC0000000000038003FF0FFFFE000FFFFE0007FFFFFFFFFFFE03FFE
> op2 =
> 1FFF007FE3FFFC000000007FFC0003FFF00000001FFFF0003FFFF000000003FFFFFFFB0007C00007FE007FFFFFFFFFFFFF000FFFFFFFFFFFFFFFFFFFFC07FC00000003FFF000FFFE063FFFFE01E00
> FAIL: t-addsub

Hmm.  Might have to trace that through to see what happens.  It adds
then subtracts and expects to get back where it started, or something
like that.

> mpz_congruent_2exp_p wrong
>     expected 1 got 0
>     a=-79228162496394124640881999872
>     c=17870212952661950464
>   a-c=-79228162514264337593543950336
>   2^d=45671926166590716193865151022383844364247891968
>     d=155
>     a=0x-FFFFFFFF0800400000000000
>     c=0xF7FFC00000000000
>   a-c=0x-1000000000000000000000000
>   2^d=0x800000000000000000000000000000000000000
>     d=0x9B
> FAIL: t-cong_2exp

If this is from check_random in that program then it might be add/sub
related too.  It tries to get numbers it expects should be congruent
by subtracting the difference between the remainders.

> Again, all tests passed after changing "-O3" to "-O2".

A bit suggestive of gcc trouble.


More information about the gmp-devel mailing list