From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 01A5C3858C2F; Tue, 14 Mar 2023 23:18:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01A5C3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678835892; bh=0TA+8EVWZS2Iq8XKQcAG7kp8h7EPp5ylD00caRJifYk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CQ+vLzpbqmKOwOtr3/LGyMVzNClqy2mLturNh6Y/93FenJWy8/FoXqUnzJs8Jxd9q DSJYMHZkjU9VFu38gUO1oOqEagQ4pTXLBqmjefGnbNEfFobw8geIibqV9k/wQAnwwR eNLtGQazgTd1yxqLo70vTUBFOtGflnALK2HQw/OU= 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:11 +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 #12 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:ec62dc95c4f8776c9f4eff2a9a06f9aef6a2d98a commit r13-6676-gec62dc95c4f8776c9f4eff2a9a06f9aef6a2d98a Author: Patrick Palka Date: Tue Mar 14 19:12:08 2023 -0400 c++: constrained template friend class matching [PR96830] When instantiating a constrained template friend naming an already declared class template, tsubst_friend_class erroneously passes to redeclare_class_template the existing template's constraints instead of those of the friend declaration, which causes the constraint comparison check therein to trivially succeed and we fail to diagnose legitimate constraint mismatches. PR c++/96830 gcc/cp/ChangeLog: * pt.cc (redeclare_class_template): Add missing "of" in constraint mismatch diagnostic. (tsubst_friend_class): For an already declared class template, substitute and pass the friend declaration's constraints to redeclare_class_template instead of passing the existing template's constraints. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-friend14.C: New test.=