This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc-2.95.2 breaks stack alignment from aligned main()
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc-2.95.2 breaks stack alignment from aligned main()
- From: stevenj at gil-galad dot mit dot edu
- Date: Sun, 7 Nov 1999 13:06:22 -0500 (EST)
- Cc: ronis at onsager dot chem dot mcgill dot ca, law at cygnus dot com
I have a small test program which exhibits the following stack alignment
bug under gcc-2.95.2 on Linux (Pentium-II, RedHat 5.2):
double variables in main() are correctly aligned to
8-byte boundaries.
double variables in a subroutine blah() are misaligned,
despite the alignment supposedly done by the default
value of -mpreferred-stack-alignment.
Because main() is aligned, and blah() is not, it seems clear that this is
a gcc problem, rather than an OS/glibc/loader problem.
The ~30 line test program, which includes checks to test the alignment of
double variables in main() and blah(), can be found in my previous post:
http://egcs.cygnus.com/ml/gcc-bugs/1999-11/msg00167.html
I am posting this because it looks like some people misunderstood my
previous message; sorry about the confusion.
Thanks in advance for any confirmation, patches, pointers, etcetera.
Cordially,
Steven G. Johnson