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++/99586] Use of class template identifier checked for CTAD before instantiation
Date: Fri, 02 Apr 2021 23:57:53 +0000	[thread overview]
Message-ID: <bug-99586-4-fkehb9QLkw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99586-4@http.gcc.gnu.org/bugzilla/>

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

--- 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:cf25e27faef75e265e659f39ef6b7d0f1695dfeb

commit r11-7962-gcf25e27faef75e265e659f39ef6b7d0f1695dfeb
Author: Patrick Palka <ppalka@redhat.com>
Date:   Fri Apr 2 19:47:09 2021 -0400

    c++: Refine check for CTAD placeholder [PR99586]

    In the below testcase, during finish_compound_literal for A<B{V}>{},
    type_uses_auto finds and returns the CTAD placeholder for B{V}, which
    tricks us into attempting CTAD on A<B{V}>{} and leads to bogus errors.

    AFAICT 'type' will always be a bare 'auto' in the CTAD case so we don't
    need to look deeply to find it; checking template_placeholder_p instead
    should suffice here.

    gcc/cp/ChangeLog:

            PR c++/99586
            * semantics.c (finish_compound_literal): Check
            template_placeholder_p instead of type_uses_auto.

    gcc/testsuite/ChangeLog:

            PR c++/99586
            * g++.dg/cpp2a/nontype-class42.C: New test.

  parent reply	other threads:[~2021-04-02 23:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-14 23:21 [Bug c++/99586] New: " johelegp at gmail dot com
2021-03-15 17:34 ` [Bug c++/99586] " mpolacek at gcc dot gnu.org
2021-04-01 13:37 ` ppalka at gcc dot gnu.org
2021-04-02 23:57 ` cvs-commit at gcc dot gnu.org [this message]
2021-04-21 13:29 ` ppalka at gcc dot gnu.org
2021-04-21 23:18 ` johelegp at gmail dot com

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-99586-4-fkehb9QLkw@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).