public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-99911-4-Al6IchO5Bv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99911-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99911

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:5a2c4c1e171d2681a506f6de2235a32293e69b3f

commit r11-9389-g5a2c4c1e171d2681a506f6de2235a32293e69b3f
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Nov 18 10:05:13 2021 -0500

    c++: template-id ADL and partial instantiation [PR99911]

    Here when partially instantiating the call get<U>(T{}) with T=N::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) <case CALL_EXPR>: 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)

  parent reply	other threads:[~2021-12-15 19:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-04 23:32 [Bug c++/99911] New: " denis.yaroshevskij at gmail dot com
2021-04-06  8:05 ` [Bug c++/99911] " rguenth at gcc dot gnu.org
2021-04-06  8:20 ` denis.yaroshevskij at gmail dot com
2021-04-06  8:21 ` denis.yaroshevskij at gmail dot com
2021-11-10 14:03 ` marxin at gcc dot gnu.org
2021-11-10 14:06 ` redi at gcc dot gnu.org
2021-11-10 15:25 ` ppalka at gcc dot gnu.org
2021-11-18 15:05 ` cvs-commit at gcc dot gnu.org
2021-12-15 19:55 ` cvs-commit at gcc dot gnu.org [this message]
2021-12-15 19:57 ` ppalka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-99911-4-Al6IchO5Bv@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).