https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89420
Bug ID: 89420 Summary: [9 Regression] ICE: unexpected expression 'int()' of kind cast_expr 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 20181028 and 20181104 (with any -std) : $ cat z1.cc template <explicit (int())> $ g++-9-20190217 -c z1.cc z1.cc:1:11: warning: 'explicit(bool)' only available with -std=c++2a or -std=gnu++2a 1 | template <explicit (int())> | ^~~~~~~~ z1.cc:1:26: internal compiler error: unexpected expression 'int()' of kind cast_expr 1 | template <explicit (int())> | ^ 0x620880 cxx_eval_constant_expression ../../gcc/cp/constexpr.c:5001 0x622104 cxx_eval_outermost_constant_expr ../../gcc/cp/constexpr.c:5115 0x6243d0 maybe_constant_value(tree_node*, tree_node*, bool) ../../gcc/cp/constexpr.c:5347 0x74ade7 check_narrowing(tree_node*, tree_node*, int, bool) ../../gcc/cp/typeck2.c:931 0x5f95b0 convert_like_real ../../gcc/cp/call.c:7366 0x603692 build_converted_constant_expr(tree_node*, tree_node*, int) ../../gcc/cp/call.c:4215 0x6466d2 build_explicit_specifier(tree_node*, int) ../../gcc/cp/decl.c:16687 0x6ab02c cp_parser_function_specifier_opt ../../gcc/cp/parser.c:14236 0x6b6be0 cp_parser_decl_specifier_seq ../../gcc/cp/parser.c:13945 0x6ce143 cp_parser_parameter_declaration ../../gcc/cp/parser.c:22266 0x6cf003 cp_parser_template_parameter ../../gcc/cp/parser.c:15979 0x6cf003 cp_parser_template_parameter_list ../../gcc/cp/parser.c:15562 0x6d457d cp_parser_explicit_template_declaration ../../gcc/cp/parser.c:27955 0x6d457d cp_parser_template_declaration_after_export ../../gcc/cp/parser.c:27989 0x6d7119 cp_parser_declaration ../../gcc/cp/parser.c:13122 0x6d775e cp_parser_translation_unit ../../gcc/cp/parser.c:4698 0x6d775e c_parse_file() ../../gcc/cp/parser.c:41039 0x7962a0 c_common_parse_file() ../../gcc/c-family/c-opts.c:1155