From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 481DF3857C55; Tue, 14 Mar 2023 23:18:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 481DF3857C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678835897; bh=kMxHFtvG1x/AnylJE9qLAtOjipYKC5Kv0FFq+Vv6VFQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nY+AE6doR13YefXX13SjJ7dypDK60JEA5UxEzl6wpYSj7zvxXbWcvOyU1376xMHi7 I1pEn6PmFuqBgvjKB5HwCbLzVHpVZvxzJMFopMZ2FpTqn+OViukUA/9pmXAVdKzpi7 hRE2t/3XJ3gchLmDL/5kglSED1YLDRZYIDj3krVY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96830] GCC does not complain about redeclaration with inconsistent requires clause Date: Tue, 14 Mar 2023 23:18:16 +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: accepts-invalid 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: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96830 --- Comment #13 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:cd5baeb4489b6a953abbc7f02fea457fd9ed2f83 commit r13-6677-gcd5baeb4489b6a953abbc7f02fea457fd9ed2f83 Author: Patrick Palka Date: Tue Mar 14 19:14:29 2023 -0400 c++: redeclaring member of constrained class template [PR96830] An out-of-line definition of a member of a constrained class template needs to repeat the template's constraints, but it turns out we don't verify anywhere that the two sets of constraints match. This patch adds such a check to push_template_decl, nearby a similar consistency check for the template parameter list lengths. PR c++/96830 gcc/cp/ChangeLog: * pt.cc (push_inline_template_parms_recursive): Set TEMPLATE_PARMS_CONSTRAINTS. (push_template_decl): For an out-of-line declaration, verify constraints for each enclosing template scope match those of the original template declaratation. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-class5.C: New test. * g++.dg/cpp2a/concepts-class5a.C: New test.=