public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug d/96157] d: No NRVO when returning an array of a non-POD struct
Date: Wed, 26 Aug 2020 08:04:42 +0000	[thread overview]
Message-ID: <bug-96157-4-xt6mls5Nq6@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-96157-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:

https://gcc.gnu.org/g:312ad889e99ff9458c01518325775e75ab57f272

commit r11-2863-g312ad889e99ff9458c01518325775e75ab57f272
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Tue Aug 25 00:39:17 2020 +0200

    d: Fix no NRVO when returning an array of a non-POD struct

    TREE_ADDRESSABLE was not propagated from the RECORD_TYPE to the ARRAY_TYPE,
so
    NRVO code generation was not being triggered.

    gcc/d/ChangeLog:

            PR d/96157
            * d-codegen.cc (d_build_call): Handle TREE_ADDRESSABLE static
arrays.
            * types.cc (make_array_type): Propagate TREE_ADDRESSABLE from base
            type to static array.

    gcc/testsuite/ChangeLog:

            PR d/96157
            * gdc.dg/pr96157a.d: New test.
            * gdc.dg/pr96157b.d: New test.

  parent reply	other threads:[~2020-08-26  8:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 15:26 [Bug d/96157] New: " ibuclaw at gdcproject dot org
2020-07-10 15:30 ` [Bug d/96157] " ibuclaw at gdcproject dot org
2020-08-26  8:04 ` cvs-commit at gcc dot gnu.org [this message]
2020-08-26  8:05 ` ibuclaw at gdcproject dot org
2020-08-30 14:24 ` cvs-commit 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=bug-96157-4-xt6mls5Nq6@http.gcc.gnu.org/bugzilla/ \
    --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: link
Be 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).