public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/101182] New: [concepts] ICE with ++ in non-template requires-expression @ 2021-06-23 21:17 jason at gcc dot gnu.org 2021-06-23 23:17 ` [Bug c++/101182] " ppalka at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: jason at gcc dot gnu.org @ 2021-06-23 21:17 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101182 Bug ID: 101182 Summary: [concepts] ICE with ++ in non-template requires-expression Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jason at gcc dot gnu.org Blocks: 67491 Target Milestone: --- int f() { if (auto a_ = f(); requires{a_++;}) {} return 0; } Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 [Bug 67491] [meta-bug] concepts issues ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/101182] [concepts] ICE with ++ in non-template requires-expression 2021-06-23 21:17 [Bug c++/101182] New: [concepts] ICE with ++ in non-template requires-expression jason at gcc dot gnu.org @ 2021-06-23 23:17 ` ppalka at gcc dot gnu.org 2021-06-24 15:30 ` cvs-commit at gcc dot gnu.org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: ppalka at gcc dot gnu.org @ 2021-06-23 23:17 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101182 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org Last reconfirmed| |2021-06-23 Ever confirmed|0 |1 CC| |ppalka at gcc dot gnu.org ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/101182] [concepts] ICE with ++ in non-template requires-expression 2021-06-23 21:17 [Bug c++/101182] New: [concepts] ICE with ++ in non-template requires-expression 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 2021-07-07 18:51 ` ppalka at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-06-24 15:30 UTC (permalink / raw) To: gcc-bugs 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/101182] [concepts] ICE with ++ in non-template requires-expression 2021-06-23 21:17 [Bug c++/101182] New: [concepts] ICE with ++ in non-template requires-expression 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 @ 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 4 siblings, 0 replies; 6+ messages in thread From: ppalka at gcc dot gnu.org @ 2021-07-07 18:51 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101182 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gcc_report_187375@mailfence | |.com --- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> --- *** Bug 100423 has been marked as a duplicate of this bug. *** ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/101182] [concepts] ICE with ++ in non-template requires-expression 2021-06-23 21:17 [Bug c++/101182] New: [concepts] ICE with ++ in non-template requires-expression jason at gcc dot gnu.org ` (2 preceding siblings ...) 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 4 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-07-13 14:03 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101182 --- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:0f00006c007f3f7e9b6fdd9906ed1e4c791f6b15 commit r11-8729-g0f00006c007f3f7e9b6fdd9906ed1e4c791f6b15 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. (cherry picked from commit c06493dc30afbf65b14d783c7cd53f20877ef577) ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/101182] [concepts] ICE with ++ in non-template requires-expression 2021-06-23 21:17 [Bug c++/101182] New: [concepts] ICE with ++ in non-template requires-expression jason at gcc dot gnu.org ` (3 preceding siblings ...) 2021-07-13 14:03 ` cvs-commit at gcc dot gnu.org @ 2021-07-13 14:06 ` ppalka at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: ppalka at gcc dot gnu.org @ 2021-07-13 14:06 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101182 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |11.2 Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> --- Fixed for 11.2/12 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-07-13 14:06 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-06-23 21:17 [Bug c++/101182] New: [concepts] ICE with ++ in non-template requires-expression 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 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
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).