public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51060] New: Temporary object stack space is not re-used
@ 2011-11-09 14:11 andvgal at gmail dot com
  2011-11-09 14:46 ` [Bug c++/51060] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: andvgal at gmail dot com @ 2011-11-09 14:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51060

             Bug #: 51060
           Summary: Temporary object stack space is not re-used
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: andvgal@gmail.com


Created attachment 25769
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25769
10 tmp objects of 1KB in size produce 10KB frame

I've tried hard finding a related incident, the only one close to it is PR
16269, but its solution doesn't help.

Attached is a sample test, which allocates 10 temporary objects of 1KB size in
own blocks in the same function.

If compiled with "-Wframe-larger-than=2048 -Werror -Os" (-Oany) the following
warning is produced:
warning: the frame size of 10240 bytes is larger than 2048 bytes
[-Wframe-larger-than=]


In our case, function frames are blown away for 100+KB, what makes a code with
similar pattern absolutely unusable in embedded systems.


Reproduced on GCC 4.6.1 x86_64 @ Debian and custom built GCC 4.6.2 for ARM.
The same issue exists in GCC 4.3.x for ARM.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-11-13  0:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09 14:11 [Bug c++/51060] New: Temporary object stack space is not re-used andvgal at gmail dot com
2011-11-09 14:46 ` [Bug c++/51060] " rguenth at gcc dot gnu.org
2011-11-11 21:57 ` jason at gcc dot gnu.org
2011-11-13  1:20 ` jason at gcc dot gnu.org
2011-11-13  2:06 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).