https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95159
Bug ID: 95159 Summary: ICE on aggregate template parameter with empty angle brackets Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pacoarjonilla at yahoo dot es Target Milestone: --- The following snippet triggers an ICE when compiled with --std=c++20 on GCC 10.0.1 >>>>>>>>>>>>>>> template <int L> struct A { A(const char (&)[L]) { } }; template <A a> struct B { }; template <A a> void fu(B<a<>>) { } >>>>>>>>>>>>>>> Compiler output: bug.cc:7:27: internal compiler error: Segmentation fault 7 | template <A a> void fu(B<a<>>) { } | ^ 0xc4dc7f crash_signal /home/paco/git/gcc/gcc/toplev.c:328 0x62e613 resolve_args(vec<tree_node*, va_gc, vl_embed>*, int) /home/paco/git/gcc/gcc/cp/call.c:4455 0x743b6e do_class_deduction /home/paco/git/gcc/gcc/cp/pt.c:28787 0x743b6e do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) /home/paco/git/gcc/gcc/cp/pt.c:28920 0x744ff2 convert_template_argument /home/paco/git/gcc/gcc/cp/pt.c:8395 0x757e9f convert_template_argument /home/paco/git/gcc/gcc/cp/pt.c:8168 0x757e9f coerce_template_parms /home/paco/git/gcc/gcc/cp/pt.c:8899 0x75a681 lookup_template_class_1 /home/paco/git/gcc/gcc/cp/pt.c:9737 0x75b8cc lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) /home/paco/git/gcc/gcc/cp/pt.c:10109 0x77808d finish_template_type(tree_node*, tree_node*, int) /home/paco/git/gcc/gcc/cp/semantics.c:3408 0x71fbdd cp_parser_template_id /home/paco/git/gcc/gcc/cp/parser.c:16734 0x71fe4c cp_parser_class_name /home/paco/git/gcc/gcc/cp/parser.c:23697 0x71cb81 cp_parser_qualifying_entity /home/paco/git/gcc/gcc/cp/parser.c:6776 0x71cb81 cp_parser_nested_name_specifier_opt /home/paco/git/gcc/gcc/cp/parser.c:6458 0x724126 cp_parser_simple_type_specifier /home/paco/git/gcc/gcc/cp/parser.c:18129 0x70ae9d cp_parser_type_specifier /home/paco/git/gcc/gcc/cp/parser.c:17787 0x70be76 cp_parser_decl_specifier_seq /home/paco/git/gcc/gcc/cp/parser.c:14359 0x726dda cp_parser_parameter_declaration /home/paco/git/gcc/gcc/cp/parser.c:22765 0x7276fa cp_parser_parameter_declaration_list /home/paco/git/gcc/gcc/cp/parser.c:22588 0x727a65 cp_parser_parameter_declaration_clause /home/paco/git/gcc/gcc/cp/parser.c:22515 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.