https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118165
Bug ID: 118165 Summary: ICE: verify_cgraph_node failed comdat-local symbol referred to by void foo() outside its comdat with -O --param=early-inlining-insns=64 -fdeclone-ctor-dtor -finstrument-functions Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Created attachment 59941 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59941&action=edit reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -O --param=early-inlining-insns=64 -fdeclone-ctor-dtor -finstrument-functions testcase.C testcase.C:13:1: error: comdat-local symbol referred to by void foo() outside its comdat 13 | } | ^ testcase.C:13:1: error: comdat-local symbol referred to by void foo() outside its comdat _ZN14basic_ifstreamC4Ei/0 (basic_ifstream::basic_ifstream(int)) Type: function definition analyzed Visibility: semantic_interposition comdat_group:_ZN14basic_ifstreamC5Ei Same comdat group as: _ZN14basic_ifstreamC2Ei/1 Address is taken. References: _ZN14basic_ifstreamC4Ei/0 (addr) _ZN14basic_ifstreamC4Ei/0 (addr) _ZTV14basic_ifstream/4 (addr) Referring: _ZN14basic_ifstreamC4Ei/0 (addr) _ZN14basic_ifstreamC4Ei/0 (addr) _ZN14basic_ifstreamC1Ei/2 (addr) _ZN14basic_ifstreamC1Ei/2 (addr) _Z3foov/3 (addr) _Z3foov/3 (addr) _ZN14basic_ifstreamC2Ei/1 (addr) _ZN14basic_ifstreamC2Ei/1 (addr) Availability: available Function flags: count:1073741824 (estimated locally) body Called by: Calls: __cyg_profile_func_exit/13 (1073741824 (estimated locally),1.00 per call) (can throw external) __builtin_return_address/11 (1073741824 (estimated locally),1.00 per call) (can throw external) __cyg_profile_func_enter/12 (1073741824 (estimated locally),1.00 per call) (can throw external) __builtin_return_address/11 (1073741824 (estimated locally),1.00 per call) (can throw external) during IPA pass: remove_symbols testcase.C:13:1: internal compiler error: verify_cgraph_node failed 0x3124b21 internal_error(char const*, ...) /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517 0x1410d40 cgraph_node::verify_node() /repo/gcc-trunk/gcc/cgraph.cc:3959 0x13ff6d4 symtab_node::verify() /repo/gcc-trunk/gcc/symtab.cc:1362 0x14008f7 symtab_node::verify_symtab_nodes() /repo/gcc-trunk/gcc/symtab.cc:1482 0x17055ac symtab_node::checking_verify_symtab_nodes() /repo/gcc-trunk/gcc/cgraph.h:693 0x17055ac symbol_table::remove_unreachable_nodes(_IO_FILE*) /repo/gcc-trunk/gcc/ipa.cc:680 0x183bdc9 execute_todo /repo/gcc-trunk/gcc/passes.cc:2169 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. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20241221071321-r15-6405-g0b63840e07132f-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --disable-bootstrap --with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --enable-libsanitizer --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-20241221071321-r15-6405-g0b63840e07132f-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20241221 (experimental) (GCC)