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++/101182] [concepts] ICE with ++ in non-template requires-expression Date: Thu, 24 Jun 2021 15:30:00 +0000 [thread overview] Message-ID: <bug-101182-4-N2it1yZhAo@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101182-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101182 --- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:c06493dc30afbf65b14d783c7cd53f20877ef577 commit r12-1792-gc06493dc30afbf65b14d783c7cd53f20877ef577 Author: Patrick Palka <ppalka@redhat.com> Date: Thu Jun 24 11:29:02 2021 -0400 c++: requires-expression folding [PR101182] Here we're crashing because cp_fold_function walks into the (templated) requirements of a requires-expression outside a template, but the folding routines aren't prepared to handle templated trees. This patch fixes this by making cp_fold use evaluate_requires_expr to fold a requires-expression as a whole, which also means we no longer need to explicitly do so during gimplification. (Note that we delay folding of such requires-expressions for sake of better diagnostics when one is used as the condition of a failed static_assert.) PR c++/101182 gcc/cp/ChangeLog: * constraint.cc (evaluate_requires_expr): Adjust function comment. * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: Move to ... (cp_fold) <case REQUIRES_EXPR>: ... here. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-requires25.C: New test.
next prev parent reply other threads:[~2021-06-24 15:30 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-23 21:17 [Bug c++/101182] New: " jason at gcc dot gnu.org 2021-06-23 23:17 ` [Bug c++/101182] " ppalka at gcc dot gnu.org 2021-06-24 15:30 ` cvs-commit at gcc dot gnu.org [this message] 2021-07-07 18:51 ` ppalka at gcc dot gnu.org 2021-07-13 14:03 ` cvs-commit at gcc dot gnu.org 2021-07-13 14:06 ` ppalka 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-101182-4-N2it1yZhAo@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).