From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CBCD63892475; Wed, 21 Apr 2021 14:27:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBCD63892475 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95486] ICE for alias CTAD with non-dependent argument and constrained constructor Date: Wed, 21 Apr 2021 14:27:34 +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.1.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: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Wed, 21 Apr 2021 14:27:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95486 --- Comment #9 from CVS Commits --- The releases/gcc-10 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:4806f9157a26cfd66c083bcc01596ff33009c0d6 commit r10-9743-g4806f9157a26cfd66c083bcc01596ff33009c0d6 Author: Patrick Palka Date: Wed Jul 29 22:06:41 2020 -0400 c++: alias_ctad_tweaks and constrained dguide [PR95486] In the below testcase, we're ICEing from alias_ctad_tweaks ultimately because the implied deduction guide for X's user-defined constructor already has constraints associated with it. We then carry over these constraints to 'fprime', the overlying deduction guide for the alias template Y, via tsubst_decl from alias_ctad_tweaks. Later in alias_ctad_tweaks we call get_constraints followed by set_constraints without doing remove_constraints in between, which triggers the !found assert in set_constraints. This patch fixes this issue by adding an intervening call to remove_constraints. gcc/cp/ChangeLog: PR c++/95486 * pt.c (alias_ctad_tweaks): Call remove_constraints before calling set_constraints. gcc/testsuite/ChangeLog: PR c++/95486 * g++.dg/cpp2a/class-deduction-alias3.C: New test. (cherry picked from commit 71141b1bd537cc516e485c834c2d36abba3f4544)=