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++/107280] [10/11/12/13 Regression] ICE: tree check: expected constructor, have view_convert_expr in cxx_eval_store_expression, at cp/constexpr.cc:5928
Date: Wed, 15 Mar 2023 18:28:26 +0000	[thread overview]
Message-ID: <bug-107280-4-Yon84dLTCe@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107280-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:

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

commit r13-6697-gbe20dcc359bcc4677c5b9ce011d3cd7b4ce94a64
Author: Marek Polacek <polacek@redhat.com>
Date:   Fri Mar 10 10:14:20 2023 -0500

    c++: ICE with constexpr lambda [PR107280]

    We crash here since r10-3661, the store_init_value hunk in particular.
    Before, we called cp_fully_fold_init, so e.g.

      {.str=VIEW_CONVERT_EXPR<char[8]>("")}

    was folded into

      {.str=""}

    but now we don't fold and keep the VCE around, and it causes trouble in
    cxx_eval_store_expression: in the !refs->is_empty () loop we descend on
    .str's initializer but since it's wrapped in a VCE, we skip the STRING_CST
    check and then crash on the CONSTRUCTOR_NO_CLEARING.

            PR c++/107280

    gcc/cp/ChangeLog:

            * constexpr.cc (cxx_eval_store_expression): Strip location
wrappers.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1z/constexpr-lambda28.C: New test.

  parent reply	other threads:[~2023-03-15 18:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 19:16 [Bug c++/107280] New: " jwjagersma at gmail dot com
2022-10-17 11:42 ` [Bug c++/107280] " marxin at gcc dot gnu.org
2022-10-17 20:47 ` mpolacek at gcc dot gnu.org
2023-03-08 22:08 ` [Bug c++/107280] [10/11/12/13 Regression] " mpolacek at gcc dot gnu.org
2023-03-08 22:40 ` mpolacek at gcc dot gnu.org
2023-03-08 22:46 ` mpolacek at gcc dot gnu.org
2023-03-15 18:28 ` cvs-commit at gcc dot gnu.org [this message]
2023-03-15 18:29 ` cvs-commit at gcc dot gnu.org
2023-03-15 18:30 ` [Bug c++/107280] [10/11 " mpolacek 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-107280-4-Yon84dLTCe@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).