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 c++/101442] [9/10 Regression] Destructor not called for a temporary object, if it's bound to a ref member of an object subject to NRVO
Date: Fri, 13 May 2022 17:14:06 +0000	[thread overview]
Message-ID: <bug-101442-4-B8MFEyS92l@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101442-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:54d1992376d7880a88778dab20a7cfe8cde32bc3

commit r10-10736-g54d1992376d7880a88778dab20a7cfe8cde32bc3
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Apr 13 13:23:08 2022 -0400

    c++: NRV and ref-extended temps [PR101442]

    This issue goes back to r83221, where the cleanup for extended ref temps
    changed from being unconditional to being tied to the declaration they
    formed part of the initializer for.

    The named return value optimization changes the cleanup for the NRV
variable
    to only run on the EH path; we don't want that change to affect temporary
    cleanups.  The perform_member_init change isn't necessary (there 'decl' is
a
    COMPONENT_REF), it's just for consistency.

            PR c++/101442

    gcc/cp/ChangeLog:

            * decl.c (cp_finish_decl): Don't pass decl to push_cleanup.
            * init.c (perform_member_init): Likewise.
            * semantics.c (push_cleanup): Adjust comment.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/initlist-nrv1.C: New test.

  parent reply	other threads:[~2022-05-13 17:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13 18:17 [Bug c++/101442] New: Destructor not called for a temporary object, if it iamsupermouse at mail dot ru
2021-07-13 18:19 ` [Bug c++/101442] Destructor not called for a temporary object, if it's bound to a ref member of an object subject to NRVO iamsupermouse at mail dot ru
2021-07-14  6:09 ` rguenth at gcc dot gnu.org
2021-07-14  9:39 ` [Bug c++/101442] [9/10/11/12 Regression] " redi at gcc dot gnu.org
2021-07-14  9:44 ` redi at gcc dot gnu.org
2021-07-14  9:45 ` redi at gcc dot gnu.org
2021-07-19 11:49 ` rguenth at gcc dot gnu.org
2022-04-13 16:13 ` jason at gcc dot gnu.org
2022-04-14  0:24 ` cvs-commit at gcc dot gnu.org
2022-05-13 16:28 ` [Bug c++/101442] [9/10/11 " cvs-commit at gcc dot gnu.org
2022-05-13 17:14 ` cvs-commit at gcc dot gnu.org [this message]
2022-05-13 17:41 ` [Bug c++/101442] [9 " cvs-commit at gcc dot gnu.org
2022-05-13 17:51 ` 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=bug-101442-4-B8MFEyS92l@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).