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++/64194] [C++14] <unresolved overloaded function type> for function template with auto return Date: Wed, 21 Apr 2021 12:25:06 +0000 [thread overview] Message-ID: <bug-64194-4-uVTteCGVkb@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-64194-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64194 --- Comment #19 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-9 branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:9499fe0403e310f4eb1f23279bff84259e120e76 commit r9-9453-g9499fe0403e310f4eb1f23279bff84259e120e76 Author: Patrick Palka <ppalka@redhat.com> Date: Wed Jul 29 22:06:44 2020 -0400 c++: overload sets and placeholder return type [PR64194] In the testcase below, template argument deduction for the call g(id<int>) goes wrong because the functions in the overload set id<int> each have a yet-undeduced auto return type, and this undeduced return type makes try_one_overload fail to match up any of the overloads with g's parameter type, leading to g's template argument going undeduced and to the overload set going unresolved. This patch fixes this issue by performing return type deduction via instantiation before doing try_one_overload, in a manner similar to what resolve_address_of_overloaded_function does. gcc/cp/ChangeLog: PR c++/64194 * pt.c (resolve_overloaded_unification): If the function template specialization has a placeholder return type, then instantiate it before attempting unification. gcc/testsuite/ChangeLog: PR c++/64194 * g++.dg/cpp1y/auto-fn60.C: New test. (cherry picked from commit 2c58f5cadfac338a67723fd6e41c9097760c4a33)
next prev parent reply other threads:[~2021-04-21 12:25 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-12-05 15:12 [Bug c++/64194] New: " redi at gcc dot gnu.org 2014-12-08 17:52 ` [Bug c++/64194] " ville.voutilainen at gmail dot com 2020-07-29 12:57 ` ppalka at gcc dot gnu.org 2020-07-29 12:57 ` ppalka at gcc dot gnu.org 2020-07-30 2:15 ` cvs-commit at gcc dot gnu.org 2020-08-03 14:51 ` ppalka at gcc dot gnu.org 2020-09-02 16:33 ` redi at gcc dot gnu.org 2020-11-10 13:24 ` redi at gcc dot gnu.org 2020-12-08 10:32 ` redi at gcc dot gnu.org 2020-12-08 22:44 ` jason at gcc dot gnu.org 2020-12-10 14:25 ` cvs-commit at gcc dot gnu.org 2021-01-18 4:08 ` ppalka at gcc dot gnu.org 2021-03-08 10:08 ` redi at gcc dot gnu.org 2021-04-21 12:25 ` cvs-commit at gcc dot gnu.org [this message] 2021-07-27 7:14 ` 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-64194-4-uVTteCGVkb@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).