public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mpolacek 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: Mon, 09 May 2022 17:11:58 +0000 [thread overview] Message-ID: <bug-105529-4-epD8rAqozT@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 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Therefore, a potential fix would be: --- a/gcc/cp/constexpr.cc +++ b/gcc/cp/constexpr.cc @@ -5916,8 +5916,9 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t, gcc_checking_assert (!*valp || (same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (*valp), type))); - if (empty_base || !(same_type_ignoring_top_level_qualifiers_p - (TREE_TYPE (init), type))) + if (empty_base || (CLASS_TYPE_P (TREE_TYPE (init)) + && !(same_type_ignoring_top_level_qualifiers_p + (TREE_TYPE (init), type)))) { /* For initialization of an empty base, the original target will be *(base*)this, evaluation of which resolves to the object This code expects code like D.2181 = {} where the type of the LHS is the derived type and the type of the RHS is the base type.
next prev parent reply other threads:[~2022-05-09 17:11 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 [this message] 2022-05-10 5:06 ` cvs-commit at gcc dot gnu.org 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-epD8rAqozT@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).