From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 111123858012; Thu, 18 Nov 2021 15:05:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 111123858012 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99911] C++20 adl issue Date: Thu, 18 Nov 2021 15:05:48 +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: 11.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:49 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99911 --- Comment #7 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:90de06a7b3ce6ae8381136e58a2dde91fbbb6eff commit r12-5373-g90de06a7b3ce6ae8381136e58a2dde91fbbb6eff Author: Patrick Palka Date: Thu Nov 18 10:05:13 2021 -0500 c++: template-id ADL and partial instantiation [PR99911] Here when partially instantiating the call get(T{}) with T=3DN::A (for which earlier unqualified name lookup for 'get' found nothing) the arguments after substitution are no longer dependent but the callee still is, so perform_koenig_lookup postpones ADL. But then we go on to diagnose the unresolved template name anyway, as if ADL was already performed and failed. This patch fixes this by avoiding the error path in question when the template arguments of an unresolved template-id are still dependent, mirroring the dependence check in perform_koenig_lookup. PR c++/99911 gcc/cp/ChangeLog: * pt.c (tsubst_copy_and_build) : Don't diagnose name lookup failure if the arguments to an unresolved template name are still dependent. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/fn-template24.C: New test.=