stack alignment bug in gcc 2.95.2

David M. Ronis ronis@kirkwood.chem.mcgill.ca
Tue Nov 30 23:39:00 GMT 1999


Hi Steve, 

I tried your test program on an i486-libc5 linux box, using gcc-2.95.2.

With the flags:

-O -malign-double :  bad alignment in blah

-O -malign-functions=3 -malign-double :  bad alignment in blah

-O -malign-double -malign-functions=3 -malign-loops=3
 -mpreferred-stack-boundary=3:  bad alignment in blah

-O -fforce-mem -fforce-addr -fomit-frame-pointer -malign-double
 -malign-functions=3 -malign-loops=3 -mpreferred-stack-boundary=3: 
 bad alignment in blah

Any of the above compiled with -O3 run without complaint.

I agree, it looks like a a real bug in gcc.  Moreover, it's about a
simple a piece of code that reproduces the bug as anybody could
expect.  Hopefully the gcc-developers will be able to track the
problem down.

David

 



More information about the Gcc-bugs mailing list