GMP 4.2.4 probably miscompiled by GCC 4.3.2 (debian lenny) on mips64el with -mabi=64: t-divrem_1 and t-fat FAIL

Laurent GUERBY laurent at
Sat Feb 28 21:07:02 CET 2009


Here is the details of what I did:

guerby at gcc51:~/gmp-4.2.4$ uname -a
Linux gcc51 #1 PREEMPT Thu Feb 12 08:21:37 CST 2009 mips64 GNU/Linux
guerby at gcc51:~/gmp-4.2.4$ gcc -v
Using built-in specs.
Target: mipsel-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.2-1.1' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --disable-libssp --enable-checking=release --build=mipsel-linux-gnu --host=mipsel-linux-gnu --target=mipsel-linux-gnu
Thread model: posix
gcc version 4.3.2 (Debian 4.3.2-1.1) 
guerby at gcc51:~/gmp-4.2.4$ echo $CC
gcc -mabi=64
guerby at gcc51:~/gmp-4.2.4$ ./configure --prefix=/opt/cfarm/gmp-4.2.4-64-b --disable-nls --disable-shared
make check
make[4]: Entering directory `/home/guerby/gmp-4.2.4/tests/mpn'
PASS: t-asmtype
PASS: t-aors_1
/bin/sh: line 4: 25983 Segmentation fault      ${dir}$tst
FAIL: t-divrem_1
/bin/sh: line 4: 25988 Bus error               ${dir}$tst
FAIL: t-fat
PASS: t-get_d
PASS: t-instrument
PASS: t-iord_u
PASS: t-mp_bases
PASS: t-perfsqr
PASS: t-scan
2 of 10 tests failed
Please report to gmp-bugs at

I tried to build GCC 4.4 with -mabi=64 on mips64el but found it blew
up in GMP __gmpn_divrem_1 so the make check is catching a significant

Torbjorn, the machine I'm using is part of the farm but I haven't
created all accounts on it yet. I have added your public key
to my account which was used to produce the above, to connect
the following should work for you:

ssh -p 9081 guerby at

Feel free to play in /home/guerby/gmp-4.2.4 or to
create /home/guerby/tege and work there, I used
the compiler in PATH from debian (/usr/bin/gcc).

A 64 bits gdb is available: /opt/cfarm/gdb-6.8-64/bin/gdb
gmp-4.2.4.tar.bz2 is in /opt/cfarm/ftp

Let me know if you need anything else,



More information about the gmp-bugs mailing list