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++/97679] [10/11 Regression] [concepts] ICE with CTAD for a nested class template with constrained constructor Date: Thu, 08 Apr 2021 17:10:54 +0000 [thread overview] Message-ID: <bug-97679-4-lfWUyq27uD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-97679-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97679 --- Comment #3 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:05708d6eef87a3dd0c68b1aed7f8d9c3824062b8 commit r11-8064-g05708d6eef87a3dd0c68b1aed7f8d9c3824062b8 Author: Patrick Palka <ppalka@redhat.com> Date: Thu Apr 8 13:07:37 2021 -0400 c++: constrained CTAD for nested class template [PR97679] In the testcase below, we're crashing during constraint checking of the implicitly generated deduction guides for the nested class template A::B because we never substitute the outer template arguments (for A) into the constraint, neither ahead of time nor as part of satisfaction. Ideally we'd like to avoid substituting into a constraint ahead of time, but the "flattening" vector 'tsubst_args' is constructed under the assumption that all outer template arguments are already substituted in, and eliminating this assumption to yield a flattening vector that includes outer (generic) template arguments suitable for substituting into the constraint would be tricky and error-prone. So this patch takes the approximate approach of substituting the outer arguments into the constraint ahead of time, so that the subsequent substitution of 'tsubst_args' is coherent and so later satisfaction just works. gcc/cp/ChangeLog: PR c++/97679 * pt.c (build_deduction_guide): Document OUTER_ARGS. Substitute them into the propagated constraints. gcc/testsuite/ChangeLog: PR c++/97679 * g++.dg/cpp2a/concepts-ctad3.C: New test.
next prev parent reply other threads:[~2021-04-08 17:10 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-02 18:47 [Bug c++/97679] New: ICE with CTAD on " ppalka at gcc dot gnu.org 2020-11-03 2:56 ` [Bug c++/97679] ICE with CTAD for " ppalka at gcc dot gnu.org 2021-01-19 15:43 ` [Bug c++/97679] [10/11 Regression] [concepts] " ppalka at gcc dot gnu.org 2021-02-26 12:13 ` rguenth at gcc dot gnu.org 2021-04-08 12:02 ` rguenth at gcc dot gnu.org 2021-04-08 17:10 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-08 20:06 ` [Bug c++/97679] [10 " ppalka at gcc dot gnu.org 2022-05-04 0:28 ` 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-97679-4-lfWUyq27uD@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).