Kevin Ryde user42 at
Mon May 3 00:11:56 CEST 2004

David Newman <david.newman at> writes:
> I cannot reproduce any instance of (a+b)-b != a by putting the code in
> a separate file

Oh, well, that happens, there's not much for it but to put more
printfs in the test program and library code and look at what happens
when it does go bad.  Or set a trap for gdb at the right iteration, if
you don't mind tracing through some assembler.

> so I reckon it's some kind of memory problem, maybe a
> old/buggy binutils or glibc. The test runs fine if I disable all asm
> code (but keep '-O3 -g -march=pentium -fomit-frame-pointer')

If it fails on -O3 but not -O2 then gcc code gen would still be the
front runner, but the fault could be anywhere.  If it's memory then
it'll probably sometimes happen and sometimes not.

More information about the gmp-devel mailing list