https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118180
Bug ID: 118180 Summary: internal compiler error: tree check: expected tree_vec, have identifier_node in tsubst_decl, at cp/pt.cc:15617 Product: gcc Version: 13.2.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rush102333 at gmail dot com Target Milestone: --- Simplified test: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ struct c { template <typename=int> struct b{}; int b1; }; template<class... Ts> struct d{ using typename Ts::b::type...; }; template struct d<c>; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Compiler Output: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <source>: In instantiation of 'struct d<c>': <source>:12:17: required from here 12 | template struct d<c>; | ^~~~ <source>:9:29: error: 'typename c::b' names 'template<class> struct c::b', which is not a type 9 | using typename Ts::b::type...; | ^~~ <source>:9:29: internal compiler error: tree check: expected tree_vec, have identifier_node in tsubst_decl, at cp/pt.cc:15617 0x2938075 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x294ee76 internal_error(char const*, ...) ???:0 0x9d5db0 tree_check_failed(tree_node const*, char const*, int, char const*, ...) ???:0 0xd479e1 instantiate_class_template(tree_node*) ???:0 0xd3c2e5 do_type_instantiation(tree_node*, tree_node*, int) ???:0 0xce5603 c_parse_file() ???:0 0xe450d9 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Please note that this currently seems to only happen on the trunk. https://godbolt.org/z/MThef5Wfe