From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 14E94385734D; Wed, 3 May 2023 19:25:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14E94385734D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683141918; bh=abX3XfU/tA3du6rT/q6tQGGqyCbE/US7U17sFEz6c5E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=c9Hq/p0H0ocjSM2oWKDxHl68Zl10d//vuHq4p1q1A5G9OPS44AH6bwKkgqR+EmyBy C9rMLxuEa11IwCc+OVKXgoO2pKjnJslS1unesqvFhfFPYxYrgBkuloXT9/8VoOd7Lg uOZn3hhSLyFJrLwms8illL3xfeD9w7LSdyLwdm3U= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/91618] [9/10/11 Regression] template-id required to friend a function template, even for a qualified-id Date: Wed, 03 May 2023 19:25:17 +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.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91618 --- Comment #15 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:7ce078ceca42f184f6f60c3ca921b6e07cf2c4bd commit r14-460-g7ce078ceca42f184f6f60c3ca921b6e07cf2c4bd Author: Jason Merrill Date: Wed May 3 13:32:55 2023 -0400 c++: over-eager friend matching [PR109649] A bug in the simplification I did around 91618; at this point X::f= has DECL_IMPLICIT_INSTANTIATION set, but we've already identified what temp= late it corresponds to, so we don't want to call check_explicit_specializati= on. To distinguish this case we need to look at DECL_TI_TEMPLATE. grokfnde= cl has for a long time set it to the OVERLOAD in this case, while the new cases I added for 91618 were leaving DECL_TEMPLATE_INFO null; let's adjust th= em to match. PR c++/91618 PR c++/109649 gcc/cp/ChangeLog: * friend.cc (do_friend): Don't call check_explicit_specializati= on if DECL_TEMPLATE_INFO is already set. * decl2.cc (check_classfn): Set DECL_TEMPLATE_INFO. * name-lookup.cc (set_decl_namespace): Likewise. gcc/testsuite/ChangeLog: * g++.dg/template/friend77.C: New test.=