public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/101442] [9/10/11/12 Regression] Destructor not called for a temporary object, if it's bound to a ref member of an object subject to NRVO Date: Wed, 14 Jul 2021 09:44:56 +0000 [thread overview] Message-ID: <bug-101442-4-BHZgEabjYR@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 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu.org --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- The regression happened after r180941 and not after r180959. Almost certainly this one, as it's the only C++ change in the range: commit b25dd954c41bf75d2bc892c7e9114908eaa7d314 Author: Jason Merrill Date: Fri Nov 4 12:54:08 2011 re PR c++/48370 (G++ fails to extend reference temporary lifetime in some situations) PR c++/48370 * call.c (extend_ref_init_temps, extend_ref_init_temps_1): New. (set_up_extended_ref_temp): Use it. Change cleanup parm to VEC. (initialize_reference): Just call convert_like. * decl.c (grok_reference_init): Just call initialize_reference. (build_init_list_var_init): Remove. (check_initializer): Change cleanup parm to VEC. Handle references like other types. Call perform_implicit_conversion instead of build_init_list_var_init. Don't use build_aggr_init for aggregate initialization of arrays. (cp_finish_decl): Change cleanup to VEC. * typeck2.c (store_init_value): Call extend_ref_init_temps. Use build_vec_init for non-constant arrays. * init.c (expand_aggr_init_1): Adjust. (build_vec_init): Avoid re-converting an initializer that's already digested. * mangle.c (mangle_ref_init_variable): Add a discriminator. * cp-tree.h: Adjust. * typeck.c (convert_for_initialization): Adjust. * decl2.c (maybe_emit_vtables): Adjust. From-SVN: r180944
next prev parent reply other threads:[~2021-07-14 9:44 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 [this message] 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 ` [Bug c++/101442] [9/10 " cvs-commit at gcc dot gnu.org 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-BHZgEabjYR@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: 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).