This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27312] New: excessive stack use for automatic object on stack
- From: "avi at argo dot co dot il" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Apr 2006 14:44:30 -0000
- Subject: [Bug c++/27312] New: excessive stack use for automatic object on stack
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
compiling the following
------start-code--------
struct X {
void g();
};
void g();
void f()
{
X x;
x.g();
g();
}
------end-code---------
yields (with -O2)
subl $24, %esp
in the prologue. without the empty class only 12 bytes are subtracted,
presumably to preserve stack alignment.
this is wasteful of stack space.
--
Summary: excessive stack use for automatic object on stack
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: avi at argo dot co dot il
GCC build triplet: x86_64-redhat-linux
GCC host triplet: x86_64-redhat-linux
GCC target triplet: i386-redhat-linux (with -m32)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27312