https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119436
Bug ID: 119436 Summary: ICE in pop_local_binding, at cp/name-lookup.cc:2636 Product: gcc Version: 15.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: --- Seems to start from gcc-6: https://godbolt.org/z/dzYv63dE7 Simplified test input: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ template <class Ty> struct _box { }; void func() { struct set_value_t {}; struct _tuple : _box<set_value_t>, _box<int> { friend class _box; }; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stack Dump: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <source>: In function 'void func()': <source>:11:1: internal compiler error: in pop_local_binding, at cp/name-lookup.cc:2636 11 | } | ^ 0x291f785 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x2936756 internal_error(char const*, ...) ???:0 0xacfde6 fancy_abort(char const*, int, char const*) ???:0 0xbbdfd9 poplevel(int, int, int) ???:0 0xd6b523 do_poplevel(tree_node*) ???:0 0xd6eafd finish_compound_stmt(tree_node*) ???:0 0xcf21b3 c_parse_file() ???:0 0xe545f9 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~