This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/9383] [SYSV] stack frame always made for nested functions
- From: "amodra at bigpond dot net dot au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Nov 2004 05:37:46 -0000
- Subject: [Bug target/9383] [SYSV] stack frame always made for nested functions
- References: <20030121123600.9383.fshvaige@cisco.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From amodra at bigpond dot net dot au 2004-11-27 05:37 -------
This is because g1 is allocated space on the stack as a result of the following
code in expand_function_start. If a function has local variables (including
hidden ones like this one) then it needs a stack frame. Other ABIs can create
leaf functions having local vars without necessarily creating a stack frame.
/* If function gets a static chain arg, store it in the stack frame.
Do this first, so it gets the first stack slot offset. */
if (current_function_needs_context)
{
last_ptr = assign_stack_local (Pmode, GET_MODE_SIZE (Pmode), 0);
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Summary|[SYSV] -fomit-frame-pointer |[SYSV] stack frame always
|has no effect on nested |made for nested functions
|functions |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9383