From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 14A193951843; Thu, 8 Apr 2021 17:10:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14A193951843 From: "cvs-commit at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 17:10:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97679 --- Comment #3 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:05708d6eef87a3dd0c68b1aed7f8d9c3824062b8 commit r11-8064-g05708d6eef87a3dd0c68b1aed7f8d9c3824062b8 Author: Patrick Palka 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.=