https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109945

--- Comment #22 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ping.  Jakub/Jason - we now have three open bugs because of this.  The patch
in comment#12 works but Jakub doesn't like it.

Instead as far as I understand we need a flag to tell us whether there's
guaranteed copy elision (in which case the programmer can expect using
the return slot address will "work", maybe be even well-defined).
As can be seen with the testcases TREE_ADDRESSABLE on the type does not
cover all cases where that's appearantly so.  Maybe those types simply
need to have TREE_ADDRESSABLE set as otherwise RTL expansion or gimplification
might introduce an additional copy, breaking copy elision?

Reply via email to