https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86219
Bug ID: 86219 Summary: [8/9 Regression] ICE in coerce_template_parms, at cp/pt.c:8515 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20180318 and 20180325 : $ cat z1.cc template <int a> struct t; template <int a> void f () { const int b = ""; t<b>::c; } $ gcc-8-20180318 -c z1.cc $ $ gcc-9-20180617 -c z1.cc z1.cc: In function 'void f()': z1.cc:6:7: internal compiler error: in coerce_template_parms, at cp/pt.c:8515 t<b>::c; ^ 0x725621 coerce_template_parms ../../gcc/cp/pt.c:8515 0x72d802 lookup_template_class_1 ../../gcc/cp/pt.c:9295 0x72d802 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) ../../gcc/cp/pt.c:9647 0x74a71d finish_template_type(tree_node*, tree_node*, int) ../../gcc/cp/semantics.c:3240 0x6f12a2 cp_parser_template_id ../../gcc/cp/parser.c:15943 0x6f13a5 cp_parser_class_name ../../gcc/cp/parser.c:22478 0x6f9ef7 cp_parser_qualifying_entity ../../gcc/cp/parser.c:6564 0x6f9ef7 cp_parser_nested_name_specifier_opt ../../gcc/cp/parser.c:6250 0x6f7dde cp_parser_simple_type_specifier ../../gcc/cp/parser.c:17270 0x6eae95 cp_parser_type_specifier ../../gcc/cp/parser.c:16945 0x6fc399 cp_parser_decl_specifier_seq ../../gcc/cp/parser.c:13709 0x703381 cp_parser_simple_declaration ../../gcc/cp/parser.c:13018 0x704e89 cp_parser_declaration_statement ../../gcc/cp/parser.c:12556 0x6eca95 cp_parser_statement ../../gcc/cp/parser.c:10900 0x6ed5b7 cp_parser_statement_seq_opt ../../gcc/cp/parser.c:11249 0x6ed68f cp_parser_compound_statement ../../gcc/cp/parser.c:11203 0x6fed01 cp_parser_function_body ../../gcc/cp/parser.c:21886 0x6fed01 cp_parser_ctor_initializer_opt_and_function_body ../../gcc/cp/parser.c:21921 0x6ff4d0 cp_parser_function_definition_after_declarator ../../gcc/cp/parser.c:26937 0x7024e1 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/cp/parser.c:26854