This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/57485] memcpy in aggregate return not eliminated
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 18 Mar 2014 16:30:13 +0000
- Subject: [Bug c/57485] memcpy in aggregate return not eliminated
- Auto-submitted: auto-generated
- References: <bug-57485-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57485
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I think this is return slot optimization. We can perform it in the first case,
because struct S s = f(); is an initializer, but not in the second case,
because we have a MODIFY_EXPR and the LHS is already addressable and in that
case the RSO is forbidden (?).