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++/105529] [13 Regression] cxx_eval_store_expression on arm because of ctor returning this since r13-160-g967cdbe6629653
Date: Tue, 10 May 2022 05:06:04 +0000	[thread overview]
Message-ID: <bug-105529-4-M6PaaqlADm@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105529-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:bb2921ab84dba014f24be06663636c7fb1361474

commit r13-221-gbb2921ab84dba014f24be06663636c7fb1361474
Author: Jason Merrill <jason@redhat.com>
Date:   Mon May 9 16:03:35 2022 -0400

    c++: fix arm-eabi crash building libstdc++ [PR105529]

    My recent change to cxx_eval_store_expression asserts that the target and
    value can only end up having different types in the case of an empty base;
    this was crashing arm-eabi compilers because in that ABI [cd]tors
    return *this, and weren't converting it to void* first.

    This also shares the 'return this' code between the three places it occurs.

    Thanks to Marek for the tests.

            PR c++/105529

    gcc/cp/ChangeLog:

            * decl.cc (maybe_return_this): Replace...
            (finish_constructor_body, finish_destructor_body): ...these.
            (finish_function_body): Call it.
            * optimize.cc (build_delete_destructor_body): Call it.
            * cp-tree.h (maybe_return_this): Declare.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/constexpr-dtor13.C: New test.
            * g++.dg/cpp2a/constexpr-dtor14.C: New test.

  parent reply	other threads:[~2022-05-10  5:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09  7:47 [Bug c++/105529] New: [13 Regression] cxx_eval_store_expression, at cp/constexpr.cc:5928 " marxin at gcc dot gnu.org
2022-05-09  7:47 ` [Bug c++/105529] " marxin at gcc dot gnu.org
2022-05-09  8:15 ` [Bug c++/105529] [13 Regression] cxx_eval_store_expression on arm because of ctor returning this " rguenth at gcc dot gnu.org
2022-05-09  8:48 ` dcb314 at hotmail dot com
2022-05-09 16:31 ` mpolacek at gcc dot gnu.org
2022-05-09 17:11 ` mpolacek at gcc dot gnu.org
2022-05-10  5:06 ` cvs-commit at gcc dot gnu.org [this message]
2022-05-10  5:06 ` 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-105529-4-M6PaaqlADm@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).