public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99586] New: Use of class template identifier checked for CTAD before instantiation
@ 2021-03-14 23:21 johelegp at gmail dot com
  2021-03-15 17:34 ` [Bug c++/99586] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: johelegp at gmail dot com @ 2021-03-14 23:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99586
           Summary: Use of class template identifier checked for CTAD
                    before instantiation
           Product: gcc
           Version: 11.0
               URL: https://godbolt.org/z/4KWWjT
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: johelegp at gmail dot com
                CC: johelegp at gmail dot com
  Target Milestone: ---

See https://godbolt.org/z/4KWWjT.
```C++
#include<array>
template<auto>struct A{};
template<auto... V>A a=A<std::array{V...}>{};
```

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/99586] Use of class template identifier checked for CTAD before instantiation
  2021-03-14 23:21 [Bug c++/99586] New: Use of class template identifier checked for CTAD before instantiation johelegp at gmail dot com
@ 2021-03-15 17:34 ` mpolacek at gcc dot gnu.org
  2021-04-01 13:37 ` ppalka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-03-15 17:34 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
   Last reconfirmed|                            |2021-03-15
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/99586] Use of class template identifier checked for CTAD before instantiation
  2021-03-14 23:21 [Bug c++/99586] New: Use of class template identifier checked for CTAD before instantiation 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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-04-01 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
                 CC|                            |ppalka at gcc dot gnu.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/99586] Use of class template identifier checked for CTAD before instantiation
  2021-03-14 23:21 [Bug c++/99586] New: Use of class template identifier checked for CTAD before instantiation 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
  2021-04-21 13:29 ` ppalka at gcc dot gnu.org
  2021-04-21 23:18 ` johelegp at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-02 23:57 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/99586] Use of class template identifier checked for CTAD before instantiation
  2021-03-14 23:21 [Bug c++/99586] New: Use of class template identifier checked for CTAD before instantiation johelegp at gmail dot com
                   ` (2 preceding siblings ...)
  2021-04-02 23:57 ` cvs-commit at gcc dot gnu.org
@ 2021-04-21 13:29 ` ppalka at gcc dot gnu.org
  2021-04-21 23:18 ` johelegp at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-04-21 13:29 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|---                         |11.0

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 11.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug c++/99586] Use of class template identifier checked for CTAD before instantiation
  2021-03-14 23:21 [Bug c++/99586] New: Use of class template identifier checked for CTAD before instantiation johelegp at gmail dot com
                   ` (3 preceding siblings ...)
  2021-04-21 13:29 ` ppalka at gcc dot gnu.org
@ 2021-04-21 23:18 ` johelegp at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: johelegp at gmail dot com @ 2021-04-21 23:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
Thank you.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-04-21 23:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14 23:21 [Bug c++/99586] New: Use of class template identifier checked for CTAD before instantiation 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
2021-04-21 13:29 ` ppalka at gcc dot gnu.org
2021-04-21 23:18 ` johelegp at gmail dot com

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).