public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104291] New: gcc accepts template argument involves template parameter(s)
@ 2022-01-30 17:20 hewillk at gmail dot com
  2022-01-30 21:27 ` [Bug c++/104291] [12 Regression] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: hewillk at gmail dot com @ 2022-01-30 17:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104291
           Summary: gcc accepts template argument involves template
                    parameter(s)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

This should be rejected.

#include<array>

template<auto>
struct S { };

template<auto... x>
struct S<std::array{x...}> { };

S<std::array{1, 2, 3}> x;

https://godbolt.org/z/ecoGPWq3q

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

* [Bug c++/104291] [12 Regression] gcc accepts template argument involves template parameter(s)
  2022-01-30 17:20 [Bug c++/104291] New: gcc accepts template argument involves template parameter(s) hewillk at gmail dot com
@ 2022-01-30 21:27 ` pinskia at gcc dot gnu.org
  2022-01-31  8:22 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-30 21:27 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
           Keywords|                            |needs-bisection
   Target Milestone|---                         |12.0
            Summary|gcc accepts template        |[12 Regression] gcc accepts
                   |argument involves template  |template argument involves
                   |parameter(s)                |template parameter(s)
   Last reconfirmed|                            |2022-01-30
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, this was rejected in GCC 11.1.0 and 11.2.0.

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

* [Bug c++/104291] [12 Regression] gcc accepts template argument involves template parameter(s)
  2022-01-30 17:20 [Bug c++/104291] New: gcc accepts template argument involves template parameter(s) hewillk at gmail dot com
  2022-01-30 21:27 ` [Bug c++/104291] [12 Regression] " pinskia at gcc dot gnu.org
@ 2022-01-31  8:22 ` rguenth at gcc dot gnu.org
  2022-01-31  9:04 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-31  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |11.2.0
           Priority|P3                          |P1

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

* [Bug c++/104291] [12 Regression] gcc accepts template argument involves template parameter(s)
  2022-01-30 17:20 [Bug c++/104291] New: gcc accepts template argument involves template parameter(s) hewillk at gmail dot com
  2022-01-30 21:27 ` [Bug c++/104291] [12 Regression] " pinskia at gcc dot gnu.org
  2022-01-31  8:22 ` rguenth at gcc dot gnu.org
@ 2022-01-31  9:04 ` redi at gcc dot gnu.org
  2022-01-31 16:44 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2022-01-31  9:04 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Started to be accepted with r12-4772
"c++: CTAD within template argument [PR102933]"

Reduced:


template<typename T, int N>
struct array
{
  T data[N];
};

  template<typename _Tp, typename... _Up>
    array(_Tp, _Up...)
      -> array<_Tp, 1 + sizeof...(_Up)>;

template<auto>
struct S { };

template<auto... x>
struct S<array{x...}> { };

S<array{1, 2, 3}> x;

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

* [Bug c++/104291] [12 Regression] gcc accepts template argument involves template parameter(s)
  2022-01-30 17:20 [Bug c++/104291] New: gcc accepts template argument involves template parameter(s) hewillk at gmail dot com
                   ` (2 preceding siblings ...)
  2022-01-31  9:04 ` redi at gcc dot gnu.org
@ 2022-01-31 16:44 ` ppalka at gcc dot gnu.org
  2022-01-31 19:15 ` cvs-commit at gcc dot gnu.org
  2022-01-31 19:15 ` ppalka at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-01-31 16:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug c++/104291] [12 Regression] gcc accepts template argument involves template parameter(s)
  2022-01-30 17:20 [Bug c++/104291] New: gcc accepts template argument involves template parameter(s) hewillk at gmail dot com
                   ` (3 preceding siblings ...)
  2022-01-31 16:44 ` ppalka at gcc dot gnu.org
@ 2022-01-31 19:15 ` cvs-commit at gcc dot gnu.org
  2022-01-31 19:15 ` ppalka at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-31 19:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:0eb06ee9a40a09d2f492461289d69aa39f757e66

commit r12-6949-g0eb06ee9a40a09d2f492461289d69aa39f757e66
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Jan 31 14:15:01 2022 -0500

    c++: CONSTRUCTORs are non-deduced contexts [PR104291]

            PR c++/104291

    gcc/cp/ChangeLog:

            * pt.cc (for_each_template_parm_r) <case CONSTRUCTOR>: Clear
            walk_subtrees if !include_nondeduced_p.  Simplify given that
            cp_walk_subtrees already walks TYPE_PTRMEMFUNC_FN_TYPE_RAW.

    gcc/testsuite/ChangeLog:

            * g++.dg/template/partial20.C: New test.

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

* [Bug c++/104291] [12 Regression] gcc accepts template argument involves template parameter(s)
  2022-01-30 17:20 [Bug c++/104291] New: gcc accepts template argument involves template parameter(s) hewillk at gmail dot com
                   ` (4 preceding siblings ...)
  2022-01-31 19:15 ` cvs-commit at gcc dot gnu.org
@ 2022-01-31 19:15 ` ppalka at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-01-31 19:15 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2022-01-31 19:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-30 17:20 [Bug c++/104291] New: gcc accepts template argument involves template parameter(s) hewillk at gmail dot com
2022-01-30 21:27 ` [Bug c++/104291] [12 Regression] " pinskia at gcc dot gnu.org
2022-01-31  8:22 ` rguenth at gcc dot gnu.org
2022-01-31  9:04 ` redi at gcc dot gnu.org
2022-01-31 16:44 ` ppalka at gcc dot gnu.org
2022-01-31 19:15 ` cvs-commit at gcc dot gnu.org
2022-01-31 19:15 ` ppalka at gcc dot gnu.org

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