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: [email protected]
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