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++/102670] Erroneous "missing template arguments" message for wrapper of ADL function template
Date: Thu, 18 Nov 2021 15:05:43 +0000	[thread overview]
Message-ID: <bug-102670-4-04jCLpWEbf@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-102670-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:6fa8e0896c6ec96eddcedb2b92502a7bbb525c03

commit r12-5372-g6fa8e0896c6ec96eddcedb2b92502a7bbb525c03
Author: Patrick Palka <ppalka@redhat.com>
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<I>(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) <case CALL_EXPR>: 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.

  parent reply	other threads:[~2021-11-18 15:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-09 18:51 [Bug c++/102670] New: " friedkeenan at protonmail dot com
2021-11-03 15:45 ` [Bug c++/102670] " ppalka at gcc dot gnu.org
2021-11-18 15:05 ` cvs-commit at gcc dot gnu.org [this message]
2022-01-11 14:00 ` 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-102670-4-04jCLpWEbf@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).