This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/39337] x86 use of VLA disables -fomit-frame-pointer
- From: "astrange at ithinksw dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2009 02:39:36 -0000
- Subject: [Bug target/39337] x86 use of VLA disables -fomit-frame-pointer
- References: <bug-39337-10175@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from astrange at ithinksw dot com 2009-03-02 02:39 -------
> This is correct, vla and alloca always uses a frame pointer because there is no way to get back to the original offsets so the compiler needs a frame pointer.
It's not restoring from the frame pointer here, it's restoring from ecx. 'addl
$8, %esp' would work just as well in the function epilogue, like it would if
this function had no VLA.
Disabling inlining does fix that problem, though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39337