https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119392
Bug ID: 119392 Summary: ICE: in build_if_in_charge, at cp/class.cc:230 Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rush102333 at gmail dot com Target Milestone: --- Input: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ namespace std { using size_t = decltype(sizeof(0)); enum class align_val_t : size_t; struct destroying_delete_t {}; } struct B { virtual ~B(); void operator delete(B*, std::destroying_delete_t); }; void delete_B(B *b) { delete b; } struct Padding { virtual void f(); }; struct VDel { virtual ~VDel(); }; struct D : virtual Padding, virtual VDel, virtual B {}; void delete_D(D *d) { delete d; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Stack Dump: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <source>:20:8: internal compiler error: in build_if_in_charge, at cp/class.cc:230 20 | struct D : virtual Padding, virtual VDel, virtual B {}; | ^ 0x291d555 diagnostic_context::diagnostic_impl(rich_location*, diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag (*) [1], diagnostic_t) ???:0 0x2934526 internal_error(char const*, ...) ???:0 0xacfad8 fancy_abort(char const*, int, char const*) ???:0 0xb2601b build_base_path(tree_code, tree_node*, tree_node*, int, int) ???:0 0xafb8f3 perform_implicit_conversion_flags(tree_node*, tree_node*, int, int) ???:0 0xdcdbc4 cp_build_function_call_vec(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int, tree_node*) ???:0 0xaec69c build_op_delete_call(tree_code, tree_node*, tree_node*, bool, tree_node*, tree_node*, int) ???:0 0xc888b9 maybe_clone_body(tree_node*) ???:0 0xd74aae expand_or_defer_fn(tree_node*) ???:0 0xc28e67 synthesize_method(tree_node*) ???:0 0xbd8cbb mark_used(tree_node*, int) ???:0 0xaf0753 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int) ???:0 0xaf1aad build_special_member_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, int) ???:0 0xbf9088 build_delete(unsigned long, tree_node*, tree_node*, special_function_kind, int, int, int) ???:0 0xbd1373 delete_sanity(unsigned long, tree_node*, tree_node*, bool, int, int) ???:0 0xcf1da3 c_parse_file() ???:0 0xe540f9 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. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ https://godbolt.org/z/r1or9dsjc