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++/68942] overly strict use of deleted function before argument-dependent lookup (ADL) Date: Thu, 29 Apr 2021 17:43:52 +0000 [thread overview] Message-ID: <bug-68942-4-qXP7EkMUzY@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-68942-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68942 --- 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:efeca0ac4155b76ce713155f190422aac20537c5 commit r12-295-gefeca0ac4155b76ce713155f190422aac20537c5 Author: Patrick Palka <ppalka@redhat.com> Date: Thu Apr 29 13:43:00 2021 -0400 c++: Overeager use of deleted function before ADL [PR68942] Here, at template definition time, ordinary name lookup for 'foo(t)' finds only the deleted function, and so we form a CALL_EXPR thereof. Later at instantiation time, when initially substituting into this CALL_EXPR with T=N::A, we end up calling mark_used on this deleted function (since it's the only function in the overload set), triggering a bogus "use of deleted function error", before we get to augment the overload set via ADL. This patch fixes this issue by using the tf_conv flag to disable mark_used during the initial substitution into the callee of a CALL_EXPR when KOENIG_P, since at this point we're still figuring out which functions are candidates. gcc/cp/ChangeLog: PR c++/68942 * pt.c (tsubst_copy_and_build) <case CALL_EXPR>: When KOENIG_P, set tf_conv during the initial substitution into the function. gcc/testsuite/ChangeLog: PR c++/68942 * g++.dg/template/koenig12.C: New test.
next prev parent reply other threads:[~2021-04-29 17:43 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-68942-4@http.gcc.gnu.org/bugzilla/> 2021-04-28 15:53 ` ppalka at gcc dot gnu.org 2021-04-29 17:43 ` cvs-commit at gcc dot gnu.org [this message] 2021-04-29 17:44 ` ppalka at gcc dot gnu.org 2021-05-03 17:36 ` cvs-commit at gcc dot gnu.org 2022-10-06 20:11 ` pinskia 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-68942-4-qXP7EkMUzY@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: linkBe 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).