This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
serious inline math pb i386
- To: egcs-bugs at cygnus dot com
- Subject: serious inline math pb i386
- From: <nbecker at fred dot net>
- Date: Tue, 7 Jul 1998 16:29:31 -0400
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.