From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E7F733857C6A; Thu, 18 Nov 2021 15:05:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7F733857C6A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102670] Erroneous "missing template arguments" message for wrapper of ADL function template Date: Thu, 18 Nov 2021 15:05:43 +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: 12.0 X-Bugzilla-Keywords: rejects-valid 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 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, 18 Nov 2021 15:05:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102670 --- Comment #2 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:6fa8e0896c6ec96eddcedb2b92502a7bbb525c03 commit r12-5372-g6fa8e0896c6ec96eddcedb2b92502a7bbb525c03 Author: Patrick Palka Date: Thu Nov 18 10:04:27 2021 -0500 c++: unqual lookup performed twice w/ template-id ADL [PR102670] Here we're incorrectly performing unqualified lookup of 'adl' again at substitution time for the call adl(t) (for which name lookup at parse time found nothing) which causes us to reject the testcase because the second unqualified lookup finds the later-declared variable template 'adl', leading to confusion. Fixed thusly. The testcase concepts-recursive-sat1.C needed to be adjusted to use ADL proper instead of relying on this incorrect second unqualified lookup. PR c++/102670 gcc/cp/ChangeLog: * pt.c (tsubst_copy_and_build) : When looking for an identifier callee in the koenig_p case, also look through TEMPLATE_ID_EXPR. Use tsubst_copy to substitute through the template arguments of the template-id. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-recursive-sat1.C: Adjust to use ADL proper. * g++.dg/cpp2a/fn-template23.C: New test.=