public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "guillaume dot melquiond at ens-lyon dot fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/23372] [4.0/4.1 Regression] Temporary aggregate copy not elided when passing parameters by value Date: Sun, 14 Aug 2005 06:45:00 -0000 [thread overview] Message-ID: <20050814064551.31057.qmail@sourceware.org> (raw) In-Reply-To: <20050813080257.23372.guillaume.melquiond@ens-lyon.fr> ------- Additional Comments From guillaume dot melquiond at ens-lyon dot fr 2005-08-14 06:45 ------- Looking at it again, I found an even worse regression with respect to g++ 3.4. Consider this testcase: struct A { int a[1000]; } A f(); void g(A); void h() { g(f()); } Ideally, h will allocate a stack frame for g and ask f to directly dump its result in it. No temporary nor memcpy will be used at all. g++ 3.4 behaves this way. g++ 4.0 however will first allocate some space for the result of f, then call f and copy its result in another temporary, and finally it will allocate the stack frame for g and copy the temporary in it. Two temporaries and two memcpys are needed for g++ 4.0. So the same issue arises when returning a result by value. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23372
next prev parent reply other threads:[~2005-08-14 6:45 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-08-13 8:03 [Bug c++/23372] New: " guillaume dot melquiond at ens-lyon dot fr 2005-08-13 14:17 ` [Bug c++/23372] " rguenth at tat dot physik dot uni-tuebingen dot de 2005-08-13 16:48 ` fang at csl dot cornell dot edu 2005-08-13 17:57 ` [Bug c++/23372] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org 2005-08-13 18:00 ` giovannibajo at libero dot it 2005-08-13 18:11 ` rguenth at tat dot physik dot uni-tuebingen dot de 2005-08-13 18:13 ` pinskia at gcc dot gnu dot org 2005-08-13 18:16 ` rguenth at tat dot physik dot uni-tuebingen dot de 2005-08-13 21:21 ` rguenth at gcc dot gnu dot org 2005-08-14 6:45 ` guillaume dot melquiond at ens-lyon dot fr [this message] 2005-08-26 14:59 ` rguenth at gcc dot gnu dot org 2005-08-26 17:40 ` guillaume dot melquiond at ens-lyon dot fr 2005-08-29 12:33 ` rguenth at gcc dot gnu dot org 2005-08-29 13:15 ` rguenth at gcc dot gnu dot org 2005-09-14 6:36 ` pinskia at gcc dot gnu dot org 2005-09-27 16:21 ` mmitchel at gcc dot gnu dot org [not found] <bug-23372-7904@http.gcc.gnu.org/bugzilla/> 2005-10-16 22:20 ` pinskia at gcc dot gnu dot org 2005-10-31 5:00 ` mmitchel at gcc dot gnu dot org 2006-01-31 15:24 ` pinskia at gcc dot gnu dot org 2006-01-31 16:03 ` rguenth at gcc dot gnu dot org 2006-01-31 16:05 ` pinskia at gcc dot gnu dot org 2006-01-31 16:05 ` pinskia at gcc dot gnu dot org 2006-02-02 9:16 ` rguenth at gcc dot gnu dot org 2006-02-02 17:16 ` sje at cup dot hp dot com 2006-02-03 1:49 ` hp at gcc dot gnu dot org 2006-02-03 9:16 ` rguenth at gcc dot gnu dot org 2006-02-07 15:36 ` rguenth at gcc dot gnu dot org 2006-08-23 14:23 ` jason at gcc dot gnu dot org 2006-08-23 14:23 ` jason at gcc dot gnu dot org 2006-08-23 14:34 ` jason at gcc dot gnu dot org 2006-10-07 3:49 ` pinskia at gcc dot gnu dot org 2006-10-07 6:16 ` pinskia at gcc dot gnu dot org [not found] <bug-23372-4@http.gcc.gnu.org/bugzilla/> 2011-03-18 15:07 ` jason at gcc dot gnu.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=20050814064551.31057.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).