public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode
@ 2023-01-19 17:54 ed at catmur dot uk
  2023-01-19 17:58 ` [Bug c++/108468] [11/12/13 Regression] " mpolacek at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ed at catmur dot uk @ 2023-01-19 17:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108468
           Summary: ICE in most_specialized_partial_spec/builtin_guide_p
                    in C++20 mode
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ed at catmur dot uk
  Target Milestone: ---

Since 11.1, the following ices in -std=c++20 and later:

template<int> struct C { template<class, class> static constexpr int x = 1; };
template<int I> template<class... A> int C<I>::x<void(A...), void(A...)> = 2;
int y = C<0>::x<void(int), void()>;

0x23ae54e internal_error(char const*, ...)
        ???:0
0xc5b614 deduction_guide_p(tree_node const*)
        ???:0
0xc5be2c builtin_guide_p(tree_node const*)
        ???:0
0xc82bdf most_specialized_partial_spec(tree_node*, int)
        ???:0
0xc83a76 instantiate_template(tree_node*, tree_node*, int)
        ???:0
0xc8c0d8 finish_template_variable(tree_node*, int)
        ???:0
0xcce05f finish_id_expression(tree_node*, tree_node*, tree_node*, cp_id_kind*,
bool, bool, bool*, bool, bool, bool, bool, char const**, unsigned int)
        ???:0

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

* [Bug c++/108468] [11/12/13 Regression] ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode
  2023-01-19 17:54 [Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode ed at catmur dot uk
@ 2023-01-19 17:58 ` mpolacek at gcc dot gnu.org
  2023-03-14 20:30 ` jason at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-01-19 17:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.4
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P2
   Last reconfirmed|                            |2023-01-19
            Summary|ICE in                      |[11/12/13 Regression] ICE
                   |most_specialized_partial_sp |in
                   |ec/builtin_guide_p in C++20 |most_specialized_partial_sp
                   |mode                        |ec/builtin_guide_p in C++20
                   |                            |mode
     Ever confirmed|0                           |1
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.  Started with r11-1615-g6b161257f9f8c7:

commit 6b161257f9f8c7a26b7d119ebc32cbbc54d2e508
Author: Jason Merrill <jason@redhat.com>
Date:   Mon Jun 22 15:44:45 2020 -0400

    c++: Improve CTAD for aggregates [PR93976]

    P2082R1 adjusted the rules for class template argument deduction for an
    aggregate to better handle arrays and pack expansions.

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

* [Bug c++/108468] [11/12/13 Regression] ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode
  2023-01-19 17:54 [Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode ed at catmur dot uk
  2023-01-19 17:58 ` [Bug c++/108468] [11/12/13 Regression] " mpolacek at gcc dot gnu.org
@ 2023-03-14 20:30 ` jason at gcc dot gnu.org
  2023-03-14 22:10 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-14 20:30 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

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

* [Bug c++/108468] [11/12/13 Regression] ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode
  2023-01-19 17:54 [Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode ed at catmur dot uk
  2023-01-19 17:58 ` [Bug c++/108468] [11/12/13 Regression] " mpolacek at gcc dot gnu.org
  2023-03-14 20:30 ` jason at gcc dot gnu.org
@ 2023-03-14 22:10 ` cvs-commit at gcc dot gnu.org
  2023-03-14 22:11 ` [Bug c++/108468] [11/12 " jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-14 22:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:9e44a9932c11f028269f3aa7e3031e703d151b0b

commit r13-6674-g9e44a9932c11f028269f3aa7e3031e703d151b0b
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Mar 14 16:32:31 2023 -0400

    c++: variable tmpl partial specialization [PR108468]

    Generally we expect TPARMS_PRIMARY_TEMPLATE to be set, but sometimes it
    isn't for partial instantiations.  This ought to be improved, but it's
    trivial to work around it in this case.

            PR c++/108468

    gcc/cp/ChangeLog:

            * pt.cc (unify_pack_expansion): Check that TPARMS_PRIMARY_TEMPLATE
            is non-null.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1y/var-templ78.C: New test.

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

* [Bug c++/108468] [11/12 Regression] ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode
  2023-01-19 17:54 [Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode ed at catmur dot uk
                   ` (2 preceding siblings ...)
  2023-03-14 22:10 ` cvs-commit at gcc dot gnu.org
@ 2023-03-14 22:11 ` jason at gcc dot gnu.org
  2023-04-18 20:45 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-14 22:11 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11/12/13 Regression] ICE   |[11/12 Regression] ICE in
                   |in                          |most_specialized_partial_sp
                   |most_specialized_partial_sp |ec/builtin_guide_p in C++20
                   |ec/builtin_guide_p in C++20 |mode
                   |mode                        |

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 13 so far.

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

* [Bug c++/108468] [11/12 Regression] ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode
  2023-01-19 17:54 [Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode ed at catmur dot uk
                   ` (3 preceding siblings ...)
  2023-03-14 22:11 ` [Bug c++/108468] [11/12 " jason at gcc dot gnu.org
@ 2023-04-18 20:45 ` cvs-commit at gcc dot gnu.org
  2023-04-22  0:22 ` [Bug c++/108468] [11 " cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-18 20:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:b210f028ee9dd55bfd9f60ccfc2c015f73dbe930

commit r12-9433-gb210f028ee9dd55bfd9f60ccfc2c015f73dbe930
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Mar 14 16:32:31 2023 -0400

    c++: variable tmpl partial specialization [PR108468]

    Generally we expect TPARMS_PRIMARY_TEMPLATE to be set, but sometimes it
    isn't for partial instantiations.  This ought to be improved, but it's
    trivial to work around it in this case.

            PR c++/108468

    gcc/cp/ChangeLog:

            * pt.cc (unify_pack_expansion): Check that TPARMS_PRIMARY_TEMPLATE
            is non-null.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1y/var-templ78.C: New test.

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

* [Bug c++/108468] [11 Regression] ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode
  2023-01-19 17:54 [Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode ed at catmur dot uk
                   ` (4 preceding siblings ...)
  2023-04-18 20:45 ` cvs-commit at gcc dot gnu.org
@ 2023-04-22  0:22 ` cvs-commit at gcc dot gnu.org
  2023-05-29 10:07 ` jakub at gcc dot gnu.org
  2023-08-11 19:37 ` jason at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-22  0:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:469881efc4ad365dce3db26dab7d33f95d36f92f

commit r11-10640-g469881efc4ad365dce3db26dab7d33f95d36f92f
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Mar 14 16:32:31 2023 -0400

    c++: variable tmpl partial specialization [PR108468]

    Generally we expect TPARMS_PRIMARY_TEMPLATE to be set, but sometimes it
    isn't for partial instantiations.  This ought to be improved, but it's
    trivial to work around it in this case.

            PR c++/108468

    gcc/cp/ChangeLog:

            * pt.c (unify_pack_expansion): Check that TPARMS_PRIMARY_TEMPLATE
            is non-null.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp1y/var-templ78.C: New test.

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

* [Bug c++/108468] [11 Regression] ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode
  2023-01-19 17:54 [Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode ed at catmur dot uk
                   ` (5 preceding siblings ...)
  2023-04-22  0:22 ` [Bug c++/108468] [11 " cvs-commit at gcc dot gnu.org
@ 2023-05-29 10:07 ` jakub at gcc dot gnu.org
  2023-08-11 19:37 ` jason at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:07 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.4                        |11.5

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.

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

* [Bug c++/108468] [11 Regression] ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode
  2023-01-19 17:54 [Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode ed at catmur dot uk
                   ` (6 preceding siblings ...)
  2023-05-29 10:07 ` jakub at gcc dot gnu.org
@ 2023-08-11 19:37 ` jason at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2023-08-11 19:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed in 11.4/12.3/13.

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

end of thread, other threads:[~2023-08-11 19:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-19 17:54 [Bug c++/108468] New: ICE in most_specialized_partial_spec/builtin_guide_p in C++20 mode ed at catmur dot uk
2023-01-19 17:58 ` [Bug c++/108468] [11/12/13 Regression] " mpolacek at gcc dot gnu.org
2023-03-14 20:30 ` jason at gcc dot gnu.org
2023-03-14 22:10 ` cvs-commit at gcc dot gnu.org
2023-03-14 22:11 ` [Bug c++/108468] [11/12 " jason at gcc dot gnu.org
2023-04-18 20:45 ` cvs-commit at gcc dot gnu.org
2023-04-22  0:22 ` [Bug c++/108468] [11 " cvs-commit at gcc dot gnu.org
2023-05-29 10:07 ` jakub at gcc dot gnu.org
2023-08-11 19:37 ` jason 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).