https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108509
Bug ID: 108509 Summary: [13 Regression] ICE in add, at hash-set.h:64 Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com CC: marxin at gcc dot gnu.org Target Milestone: --- gcc 13.0.1 20230122 snapshot (g:844eab81da3f49da88e8bb02e2b1255ba88d02b0) ICEs when compiling the following testcase, reduced from test/CodeGenCXX/vtable-available-externally.cpp from the clang 15 test suite, w/ -O1 -fdevirtualize -fno-tree-fre: struct B { virtual void deref (); }; struct RefPtr { B *p; RefPtr () { p->deref (); } }; void f () { RefPtr b; } % g++-13 -O1 -fdevirtualize -fno-tree-fre -c ce52fpmj.cpp during IPA pass: remove_symbols ce52fpmj.cpp:18:1: internal compiler error: in add, at hash-set.h:64 18 | } | ^ 0x7fa104 hash_set<symtab_node*, false, default_hash_traits<symtab_node*> >::add(symtab_node* const&) /var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/hash-set.h:64 0x7faaf4 hash_set<void*, false, default_hash_traits<void*> >::add(void* const&) /var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/tree.h:3644 0x7faaf4 walk_polymorphic_call_targets /var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/ipa.cc:185 0x7faaf4 symbol_table::remove_unreachable_nodes(_IO_FILE*) /var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/ipa.cc:430 0x1108079 execute_todo /var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/passes.cc:2159