public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109320] New: [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795
@ 2023-03-28 18:54 gscfq@t-online.de
  2023-03-28 19:04 ` [Bug c++/109320] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2023-03-28 18:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109320
           Summary: [13 Regression] ICE in coerce_template_parameter_pack,
                    at cp/pt.cc:8795
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started between 20230226 and 20230312, with -std=c++20 or -std=c++23 :


$ cat z1.cc
template<bool B>
struct S {};
template<int... C>
using u = S<true>;
struct X {};
X a = u {};


$ g++-13-20230326 -c z1.cc -std=c++23
z1.cc:6:10: internal compiler error: Segmentation fault
    6 | X a = u {};
      |          ^
0xe24a1f crash_signal
        ../../gcc/toplev.cc:314
0x8a3de1 coerce_template_parameter_pack
        ../../gcc/cp/pt.cc:8795
0x8a3de1 coerce_template_parms(tree_node*, tree_node*, tree_node*, int, bool)
        ../../gcc/cp/pt.cc:9067
0x8b10fd type_targs_deducible_from(tree_node*, tree_node*)
        ../../gcc/cp/pt.cc:30278
0x8b12b8 alias_ctad_tweaks
        ../../gcc/cp/pt.cc:30224
0x88d434 deduction_guides_for
        ../../gcc/cp/pt.cc:30375
0x88dae5 do_class_deduction
        ../../gcc/cp/pt.cc:30522
0x88dae5 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        ../../gcc/cp/pt.cc:30715
0x8c2f20 finish_compound_literal(tree_node*, tree_node*, int, fcl_t)
        ../../gcc/cp/semantics.cc:3213
0x845d1c cp_parser_functional_cast
        ../../gcc/cp/parser.cc:32610
0x856d2b cp_parser_postfix_expression
        ../../gcc/cp/parser.cc:7703
0x86a60f cp_parser_unary_expression
        ../../gcc/cp/parser.cc:9141
0x83e79f cp_parser_cast_expression
        ../../gcc/cp/parser.cc:10045
0x83f07f cp_parser_binary_expression
        ../../gcc/cp/parser.cc:10147
0x83fa74 cp_parser_assignment_expression
        ../../gcc/cp/parser.cc:10490
0x841bb7 cp_parser_constant_expression
        ../../gcc/cp/parser.cc:10785
0x842c31 cp_parser_initializer_clause
        ../../gcc/cp/parser.cc:25489
0x844aab cp_parser_initializer
        ../../gcc/cp/parser.cc:25429
0x874d2c cp_parser_init_declarator
        ../../gcc/cp/parser.cc:22994
0x84fd4f cp_parser_simple_declaration
        ../../gcc/cp/parser.cc:15402

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

* [Bug c++/109320] [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795
  2023-03-28 18:54 [Bug c++/109320] New: [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795 gscfq@t-online.de
@ 2023-03-28 19:04 ` mpolacek at gcc dot gnu.org
  2023-03-28 23:31 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-03-28 19:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-03-28
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1
   Target Milestone|---                         |13.0
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r13-6553-g148cbb153dafd6:

commit 148cbb153dafd6b21d83c00787acd430aec68a3d
Author: Jason Merrill <jason@redhat.com>
Date:   Thu Feb 9 12:51:51 2023 -0800

    c++: add __is_deducible trait [PR105841]

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

* [Bug c++/109320] [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795
  2023-03-28 18:54 [Bug c++/109320] New: [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795 gscfq@t-online.de
  2023-03-28 19:04 ` [Bug c++/109320] " mpolacek at gcc dot gnu.org
@ 2023-03-28 23:31 ` jason at gcc dot gnu.org
  2023-03-28 23:32 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-28 23:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug c++/109320] [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795
  2023-03-28 18:54 [Bug c++/109320] New: [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795 gscfq@t-online.de
  2023-03-28 19:04 ` [Bug c++/109320] " mpolacek at gcc dot gnu.org
  2023-03-28 23:31 ` jason at gcc dot gnu.org
@ 2023-03-28 23:32 ` jason at gcc dot gnu.org
  2023-03-29  2:24 ` cvs-commit at gcc dot gnu.org
  2023-03-29  2:24 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-28 23:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

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

* [Bug c++/109320] [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795
  2023-03-28 18:54 [Bug c++/109320] New: [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2023-03-28 23:32 ` jason at gcc dot gnu.org
@ 2023-03-29  2:24 ` cvs-commit at gcc dot gnu.org
  2023-03-29  2:24 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-29  2:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:91293ffb6af18705ab7857dc47656bdd74a9ce31

commit r13-6922-g91293ffb6af18705ab7857dc47656bdd74a9ce31
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Mar 28 17:42:23 2023 -0400

    c++: alias ctad refinements [PR109321]

    The two hunks fix missing handling demonstrated by the two testcases:
first,
    if we omit one alias template parm but include another, we need to rewrite
    the deduced template args to reflect the new position of the included parm.
    Second, if we can't deduce any template args for a parameter pack, it is
    deduced to an empty pack.

            PR c++/109321
            PR c++/109320

    gcc/cp/ChangeLog:

            * pt.cc (alias_ctad_tweaks): Rewrite deduced args.
            (type_targs_deducible_from): Handle null pack deduction.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/class-deduction-alias16.C: New test.
            * g++.dg/cpp2a/class-deduction-alias17.C: New test.

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

* [Bug c++/109320] [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795
  2023-03-28 18:54 [Bug c++/109320] New: [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2023-03-29  2:24 ` cvs-commit at gcc dot gnu.org
@ 2023-03-29  2:24 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-29  2:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2023-03-29  2:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 18:54 [Bug c++/109320] New: [13 Regression] ICE in coerce_template_parameter_pack, at cp/pt.cc:8795 gscfq@t-online.de
2023-03-28 19:04 ` [Bug c++/109320] " mpolacek at gcc dot gnu.org
2023-03-28 23:31 ` jason at gcc dot gnu.org
2023-03-28 23:32 ` jason at gcc dot gnu.org
2023-03-29  2:24 ` cvs-commit at gcc dot gnu.org
2023-03-29  2:24 ` 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).