public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/16269] g++ doesn't reuse stack space Date: Sat, 04 Sep 2004 00:06:00 -0000 [thread overview] Message-ID: <20040904000641.19127.qmail@sourceware.org> (raw) In-Reply-To: <20040629144215.16269.mrs@apple.com> ------- Additional Comments From rth at gcc dot gnu dot org 2004-09-04 00:06 ------- No, not related to 9997. In this case we have struct A <D1614>; struct A <D1615>; ... <D1614> = foo (); operator= (&a, &<D1614>); <D1615> = foo (); operator= (&a, &<D1615>); These two compiler temporaries are in the same scope, and thus the code that lays out stack space will not be given an opportunity to share the memory. In order for this to work as you expect, the front end would have to be changed to generate { struct A <D1614>; <D1614> = foo (); operator= (&a, &<D1614>); } { struct A <D1615>; <D1615> = foo (); operator= (&a, &<D1615>); } In other words, be more explicit about the lifetimes of the temporaries that it creates. -- What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2004-07-10 02:50:38 |2004-09-04 00:06:38 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16269
next prev parent reply other threads:[~2004-09-04 0:06 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-06-29 14:49 [Bug c++/16269] New: " mrs at apple dot com 2004-06-29 15:08 ` [Bug c++/16269] " pinskia at gcc dot gnu dot org 2004-07-10 2:50 ` giovannibajo at libero dot it 2004-09-03 23:52 ` rth at gcc dot gnu dot org 2004-09-04 0:06 ` rth at gcc dot gnu dot org [this message] [not found] <bug-16269-1447@http.gcc.gnu.org/bugzilla/> 2006-09-06 20:56 ` jason at gcc dot gnu dot org 2009-04-22 21:12 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040904000641.19127.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).