serious inline math pb i386

Bonard B. Timmons III timmons@eskimo.com
Wed Jul 15 01:09:00 GMT 1998


Here's another code sample that SIGSEGVs when pow is inlined:

#include <math.h>

int main() {
	char c[3];
	double x = pow(3.0,2.0);
	return 0;
}


Here, we find that it can only work for arrays of size 1, 2, or 4
bytes; anything else segfaults. Also, reversing the order of the char
and double lines works around the bug.

I cannot test HJL's patch right now -- has it NOT worked for anyone?

Thanks,
Bake



More information about the Gcc-bugs mailing list