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++/99885] CTAD fails for auto const& NTTP Date: Tue, 20 Apr 2021 16:09:07 +0000 [thread overview] Message-ID: <bug-99885-4-a73DXK6PlW@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99885-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99885 --- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>: https://gcc.gnu.org/g:904cbf6ae2a1e45b3a272365cca19f9dd9a27fa2 commit r10-9733-g904cbf6ae2a1e45b3a272365cca19f9dd9a27fa2 Author: Patrick Palka <ppalka@redhat.com> Date: Tue Apr 20 12:06:24 2021 -0400 c++: Fix deduction with reference NTTP [PR83476] In the testcase ref11.C below, during deduction for the call f(a), uses_deducible_template_parms returns false for the dependent specialization A<V> because the generic template argument V here is wrapped in an implicit INDIRECT_REF (formed from template_parm_to_arg). Since uses_deducible_template_parms returns false, unify_one_argument exits early without ever attempting to deduce 'n' for 'V'. This patch fixes this by making deducible_expression look through such implicit INDIRECT_REFs. gcc/cp/ChangeLog: PR c++/83476 PR c++/99885 * pt.c (deducible_expression): Look through implicit INDIRECT_REFs as well. gcc/testsuite/ChangeLog: PR c++/83476 PR c++/99885 * g++.dg/cpp1z/class-deduction85.C: New test. * g++.dg/template/ref11.C: New test. (cherry picked from commit 2ccc05a5141506fde0e20dec702c717fd67bf6ee)
next prev parent reply other threads:[~2021-04-20 16:09 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-02 21:47 [Bug c++/99885] New: " ldalessandro at gmail dot com 2021-04-13 19:14 ` [Bug c++/99885] " ppalka at gcc dot gnu.org 2021-04-14 12:55 ` cvs-commit at gcc dot gnu.org 2021-04-14 14:07 ` ppalka at gcc dot gnu.org 2021-04-14 14:39 ` ppalka at gcc dot gnu.org 2021-04-20 16:09 ` cvs-commit at gcc dot gnu.org [this message] 2022-05-11 14:59 ` cvs-commit at gcc dot gnu.org 2022-05-11 15:01 ` ppalka at gcc dot gnu.org 2022-05-11 15:02 ` 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-99885-4-a73DXK6PlW@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).