From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 30DEE3858415; Wed, 15 Dec 2021 19:55:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 30DEE3858415 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99911] C++20 adl issue Date: Wed, 15 Dec 2021 19:55:26 +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: Wed, 15 Dec 2021 19:55:27 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99911 --- Comment #8 from CVS Commits --- The releases/gcc-11 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:5a2c4c1e171d2681a506f6de2235a32293e69b3f commit r11-9389-g5a2c4c1e171d2681a506f6de2235a32293e69b3f 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. (cherry picked from commit 90de06a7b3ce6ae8381136e58a2dde91fbbb6eff)=