This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

serious inline math pb i386


I'm using egcs-1.0.3 + glibc-2.0.7 (RH5.1). Computer is i686-pc-linux-gnu.

I have a program that gives a segfault when compiled with -O, but not
if -D__NO_MATH_INLINES is defined.  gdb says the segfault is in pow
(double __x, double __y) from __math.h, but the stack is apparantly
corrupted so I'm not sure if it can be trusted.

When compiled with -D__NO_MATH_INLINES the result is fine, it's not
doing anything strange (actually the last line I can step to that
causes the segfault is computing:

  pc_ceiling = pow (10.0, pc_ceiling_dB / 10.0);

where pc_ceiling is declared float (not double), and pc_ceiling_dB is
#defined to be -4.9691, with the normal result being:
 (gdb) p pc_ceiling
$2 = 0.318485737

Any ideas?  The program is too large to send.  I tried compiling just
that one line, and it runs normally.  I suspect something screwed up
with the inlining.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]