gcc 4.4.0 on SPARC - optimisation problem

Dr. David Kirkby david.kirkby@onetel.net
Wed Jul 1 09:48:00 GMT 2009


On a Sun T5240 (16 core device, 32 GM RAM, countless TB of disk space) 
I installed gcc 4.4.0. The computer was kindly donated by Sun to the 
University of Washington for the Sage project.

http://www.sagemath.org/

The method I used to create gcc 4.4.0 was

1) Compiled GMP 4.3.1 with the compiler supplied by Sun 
(/usr/sfw/bin/gcc), which is version 3.4.3 of gcc. All GMP tests passed.

2) Compiled  MPFR 2.4.1. All tests passed

3) Buuild gcc 4.4.0 with:

kirkby@t2:[~] $ gcc -v
Using built-in specs.
Target: sparc-sun-solaris2.10
Configured with: /home/kirkby/gcc-4.4.0/configure CC=/usr/sfw/bin/gcc 
--prefix=/usr/local/gcc-4.4.0-sun-linker --without-gnu-as 
--without-gnu-ld --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld 
--enable-languages=c,c++,fortran --with-mpfr-lib=/usr/local/lib 
--with-mpfr-include=/usr/local/include 
--with-gmp-include=/usr/local/include --with-gmp-lib=/usr/local/lib 
--with-libiconv-prefix=/usr/lib/iconv
Thread model: posix
gcc version 4.4.0 (GCC)

Now if I build MPFR, with no optimisation, all 148 tests pass. Build 
MPFR with -O1 or -O2 and 20 tests fail.

I've built gcc 4.4.0 two ways on this machine - one using the Sun linker 
and assembler, another using the GNU linker and assembler. In both cases 
20 MPFR tests fail, despite the fact they all pass with gcc 3.4.3. I 
can't be 100% sure they are the same 20 tests, but the fact the number 
is the same, probably means they are the same.

I have also built gcc, but in this case using only the sun linker and 
assembler on another machine in England, which is personally owned by 
me. On that machine, I do not have this issue at all.

Needless to say my own machine is not so high spec as the one donated by 
Sun to the University of Washington, but one difference is that the OS 
is more upto date. On my own machine in the UK, the version of Solaris 
10 is update 6 (October 2008), whereas at the University of Washington, 
their machine is running update 4 (August 2007)

Has anyone any thoughts?

If there is a *serious* gcc developer which would like to verify 
themselves this, they could be given an account on the machine. (That's 
*not* an invite for anyone who fancies playing with a 16 core machine to 
have a shell account.)

Dave



More information about the Gcc-help mailing list