GCC and GMP 5.0.1

Torbjorn Granlund tg at gmplib.org
Sun Feb 27 10:00:55 CET 2011


bodrato at mail.dm.unipi.it writes:

  I'm very happy to thank Steve for his work on Debian's GMP. I'm a Debian
  user :-) ... I have to test the non-Linux flavour of Debian, if I find the
  necessary courage.
  
I tried it, it was until a few days days ago visible in the GMP testing
pages.  (I didn't remove it because it wasn't useful for GMP, but due to
hardware failures.)

  When we released the 5.0 versions of GMP, we basically announced it as
  "experimental". We wrote:
  "The amount of new code means that there might be more bugs in GMP 5.0
   than in most GMP releases in the past.  We therefore still maintain
   GMP 4.3 and advice users concerned about stability to use the latest
   release from that release series."
  This means that people are authorised to suspect of possible regressions,
  aren't they?
  
Indeed, and that was indeed our intention, to make people who use GMP
become suspicious.

But while compiler correctness is extremely important, causing problems
for GCC with GMP should be a very minor concern when deciding whether to
use GMP 4.3 or GMP 5.0 on a system.

Note that Debian's default compiler (for several years, and as far as I
can tell still today) is GCC 4.3.2.  It is well known that this compiler
cannot be used to compile GMP.  Since Debian is one of the most
important platforms, I have both tried and failed to change GMP to
workaround the GCC 4.3.2 bugs, and tried and failed to make Debian patch
their GCC.  Many, many people will surely get broken GMP compiles due to
this widely distributed GCC bug.

When Steve explains that Debian now worry about GMP bugs, it is somewhat
ironical.  It is like worrying about getting hit by a meteorite when
crossing a busy road...  Both considering how Debian have not worried
about maintaining their default compiler, and considering GCC's bug
track record and GMP's.

  > The likelihood that GCC's constant folding should strike a GMP bug is
  > extremely slim.
  
  GCC uses GMP also for loop optimization, through PPL.
  
During cross compilation, or always?
Do they use operands in the FFT and DIV_DC operand ranges?

-- 
Torbjörn


More information about the gmp-discuss mailing list