optimization breaks atanh call (C on x86 GNU/Linux)

Theodore Hong twh1@doc.ic.ac.uk
Tue Feb 8 16:31:00 GMT 2000


N8TM@aol.com wrote:
> >When I try to compile a call to atanh using -O1, the >linker
> >crashes with the complaint, "undefined reference to >`__log1p'".
> >However, if I turn off optimization, it compiles and runs fine.
> 
> I no longer have RH5.0 installed, so I cannot verify this, but that
> looks like a problem with an include file <bits/mathinline.h>.
> These files have been notoriously buggy; perhaps your simplest
> method to verify this would be to examine your <math.h> to see how
> to disable mathinline.h.  Typical glibc installations disable it at
> -O0 and -Os and have an additional -D option to disable at all
> optimizations.  This doesn't look like a gcc bug.  glibc-2.1.3 is
> likely to be the first version with a reasonably reliable
> mathinline.h.
> 
> Tim tprince@computer.org

thanks Tim and Martin!  (who also pointed out the same thing)
recompiling with -D__NO_MATH_INLINES works.

theo



More information about the Gcc-bugs mailing list