https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98899
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |10.3 Status|UNCONFIRMED |NEW Summary|ICE: Illegal instruction: 4 |[10/11 Regression] ICE in |"error: could not convert |tsubst_copy, at |'<unparsed>' from |cp/pt.c:16198 since |''<invalid tree code>'" on |r10-1280-g78f7607db4c53f8c |macOS | CC| |marxin at gcc dot gnu.org, | |mpolacek at gcc dot gnu.org Last reconfirmed| |2021-02-01 Keywords| |ice-on-valid-code Ever confirmed|0 |1 Known to work| |9.3.0 Known to fail| |10.2.0, 11.0 --- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> --- Thank you for the bug report. Reduce test-case: $ cat pr98899.ii template <int __v> struct integral_constant { static constexpr int value = __v; }; template <typename> struct conditional; template <typename...> struct __and_; template <typename _B1, typename _B2> struct __and_<_B1, _B2> : conditional<_B1>::type {}; template <typename...> struct __is_nt_constructible_impl : integral_constant<0> {}; template <typename... _Args> struct is_nothrow_constructible : __and_<int, __is_nt_constructible_impl<_Args...>> {}; template <typename> struct conditional { typedef __is_nt_constructible_impl<> type; }; class locale { struct token { enum {} typedef yytokentype; }; template <typename Base> struct basic_symbol { basic_symbol(typename Base::kind_type, int) noexcept(is_nothrow_constructible<>::value); }; struct by_kind { typedef token::yytokentype kind_type; }; struct symbol_type : basic_symbol<by_kind> { int symbol_type_v; symbol_type() : basic_symbol(token::yytokentype(), symbol_type_v) {} }; }; $ g++ pr98899.ii -c -Werror pr98899.ii: In instantiation of ‘locale::basic_symbol<Base>::basic_symbol(typename Base::kind_type, int) [with Base = locale::by_kind; typename Base::kind_type = locale::token::yytokentype]’: pr98899.ii:29:69: required from here pr98899.ii:21:5: internal compiler error: in tsubst_copy, at cp/pt.c:17205 21 | basic_symbol(typename Base::kind_type, | ^~~~~~~~~~~~ 0x6e0e47 tsubst_copy /home/marxin/Programming/gcc/gcc/cp/pt.c:17205 0xb24f7e tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) /home/marxin/Programming/gcc/gcc/cp/pt.c:20789 0xb28755 maybe_instantiate_noexcept(tree_node*, int) /home/marxin/Programming/gcc/gcc/cp/pt.c:25592 0xb2833c maybe_instantiate_noexcept(tree_node*, int) /home/marxin/Programming/gcc/gcc/cp/pt.c:25535 0xa194ca mark_used(tree_node*, int) /home/marxin/Programming/gcc/gcc/cp/decl2.c:5610 0x9623a5 build_over_call /home/marxin/Programming/gcc/gcc/cp/call.c:9351 0x95f722 build_new_method_call_1 /home/marxin/Programming/gcc/gcc/cp/call.c:10637 0x95f722 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int) /home/marxin/Programming/gcc/gcc/cp/call.c:10712 0x960a86 build_special_member_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, int) /home/marxin/Programming/gcc/gcc/cp/call.c:10113 0xa385ca expand_default_init /home/marxin/Programming/gcc/gcc/cp/init.c:1983 0xa385ca expand_aggr_init_1 /home/marxin/Programming/gcc/gcc/cp/init.c:2098 0xa3fb1b emit_mem_initializers(tree_node*) /home/marxin/Programming/gcc/gcc/cp/init.c:1354 0xaf39b9 cp_parser_mem_initializer_list /home/marxin/Programming/gcc/gcc/cp/parser.c:15907 0xaf39b9 cp_parser_ctor_initializer_opt /home/marxin/Programming/gcc/gcc/cp/parser.c:15815 0xaf39b9 cp_parser_ctor_initializer_opt_and_function_body /home/marxin/Programming/gcc/gcc/cp/parser.c:24027 0xaf511a cp_parser_function_definition_after_declarator /home/marxin/Programming/gcc/gcc/cp/parser.c:29938 0xaf5624 cp_parser_late_parsing_for_member /home/marxin/Programming/gcc/gcc/cp/parser.c:30845 0xacea63 cp_parser_class_specifier_1 /home/marxin/Programming/gcc/gcc/cp/parser.c:25104 0xacfa7b cp_parser_class_specifier /home/marxin/Programming/gcc/gcc/cp/parser.c:25128 0xacfa7b cp_parser_type_specifier /home/marxin/Programming/gcc/gcc/cp/parser.c:18381 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.