https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94677
Bug ID: 94677 Summary: [10 Regression] ICE: verify_cgraph_node failed (error: invalid calls_comdat_local flag) when compiling LLVM 10.0.0 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: marvin_schmidt at gmx dot net Target Milestone: --- Hi, I'm getting the following ICE with the GCC 10 20200419 snapshot: $ g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/x86_64-pc-linux-gnu/libexec/gcc/x86_64-pc-linux-gnu/10.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/paludis/build/sys-devel-gcc-10.0.1_pre20200419/work/gcc-10-20200419/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --prefix=/usr/x86_64-pc-linux-gnu --datarootdir=/usr/share --localstatedir=/var --sysconfdir=/etc --disable-dependency-tracking --enable-fast-install --enable-serial-configure --disable-bootstrap --disable-decimal-float --disable-install-libiberty --disable-libada --disable-libatomic --disable-libcilkrts --disable-libffi --disable-libgfortran --disable-libgo --disable-libgomp --disable-libitm --disable-libobjc --disable-liboffloadmic --disable-libquadmath --disable-libsanitizer --disable-libssp --disable-libstdcxx --disable-libstdc++-v3 --disable-libvtv --disable-vtable-verify --disable-multilib --disable-nls --disable-shared --enable-lto --enable-plugin --enable-plugins --enable-threads --enable-languages=c,c++,fortran,objc,obj-c++ --with-sysroot= --with-gxx-include-dir=/usr/x86_64-pc-linux-gnu/include/c++/10.0.1 --without-isl --with-lib-path=/usr/x86_64-pc-linux-gnu/lib --with-as=/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-as --with-ld=/usr/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld --with-system-zlib --with-glibc-version=2.11 --enable-linker-build-id --with-multilib-list= --disable-libhsail-rt --enable-default-pie --disable-libphobos --enable-analyzer --with-zstd --program-transform='s,$,-10,' --enable-cet Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.1 20200419 (experimental) (GCC) when trying to compile LLVM 10.0.0: [log] [2650/3208] /usr/bin/x86_64-pc-linux-gnu-c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Passes -I/var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/lib/Passes -I/usr/x86_64-pc-linux-gnu/incl ude/libxml2 -Iinclude -I/var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/include -pipe -O2 -mtune=generic -march=x86-64 -fPIC -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializ ers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std= c++14 -MD -MT lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o -MF lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o.d -o lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o -c /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/l lvm/lib/Passes/PassBuilder.cpp FAILED: lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o /usr/bin/x86_64-pc-linux-gnu-c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Ilib/Passes -I/var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/lib/Passes -I/usr/x86_64-pc-linux-gnu/include/libxml2 -Iinclude -I/var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/include -pipe -O2 -mtune=generic -march=x86-64 -fPIC -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedanti c -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++14 -MD -M T lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o -MF lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o.d -o lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o -c /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/lib/Pass es/PassBuilder.cpp In file included from /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/include/llvm/IR/PassManager.h:47, from /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/include/llvm/Analysis/TargetLibraryInfo.h:19, from /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/include/llvm/Analysis/LazyCallGraph.h:48, from /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/include/llvm/Analysis/CGSCCPassManager.h:97, from /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/include/llvm/Passes/PassBuilder.h:19, from /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/lib/Passes/PassBuilder.cpp:17: /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h: In member function 'std::unique_ptr<llvm::detail::AnalysisResultConcept<IRUnitT, PreservedAnalysesT, InvalidatorT> > llvm::detail::AnalysisPassModel <IRUnitT, PassT, PreservedAnalysesT, InvalidatorT, ExtraArgTs>::run(IRUnitT&, llvm::AnalysisManager<IRUnitT, ExtraArgTs ...>&, ExtraArgTs ...) [with IRUnitT = llvm::Module; PassT = llvm::ProfileSummaryAnalysis; PreservedAnalysesT = llvm::PreservedAnalyse s; InvalidatorT = llvm::AnalysisManager<llvm::Module>::Invalidator; ExtraArgTs = {}]': /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:290:3: error: invalid calls_comdat_local flag 290 | run(IRUnitT &IR, AnalysisManager<IRUnitT, ExtraArgTs...> &AM, | ^~~ _ZN4llvm6detail17AnalysisPassModelINS_6ModuleENS_22ProfileSummaryAnalysisENS_17PreservedAnalysesENS_15AnalysisManagerIS2_JEE11InvalidatorEJEE3runERS2_RS6_/51727 (std::unique_ptr<llvm::detail::AnalysisResultConcept<IRUnitT, PreservedAnalysesT, Invalidator T> > llvm::detail::AnalysisPassModel<IRUnitT, PassT, PreservedAnalysesT, InvalidatorT, ExtraArgTs>::run(IRUnitT&, llvm::AnalysisManager<IRUnitT, ExtraArgTs ...>&, ExtraArgTs ...) [with IRUnitT = llvm::Module; PassT = llvm::ProfileSummaryAnalysis; Preserv edAnalysesT = llvm::PreservedAnalyses; InvalidatorT = llvm::AnalysisManager<llvm::Module>::Invalidator; ExtraArgTs = {}]) @0x7f41a4ee42d0 Type: function definition analyzed Visibility: externally_visible public weak comdat comdat_group:_ZN4llvm6detail17AnalysisPassModelINS_6ModuleENS_22ProfileSummaryAnalysisENS_17PreservedAnalysesENS_15AnalysisManagerIS2_JEE11InvalidatorEJEE3runERS2_RS6_ one_only virtual Same comdat group as: _ZNKSt14default_deleteIN4llvm14ProfileSummaryEEclEPS1_.isra.0/83664 Address is taken. References: Referring: _ZTVN4llvm6detail17AnalysisPassModelINS_6ModuleENS_22ProfileSummaryAnalysisENS_17PreservedAnalysesENS_15AnalysisManagerIS2_JEE11InvalidatorEJEEE/46611 (addr) Availability: available Function flags: count:1073741824 (estimated locally) body calls_comdat_local Called by: Calls: _ZdlPvm/62251 (401890829 (estimated locally),0.37 per call) _ZdlPvm/62251 (214891026 (estimated locally),0.20 per call) _ZdlPvm/62251 (1073741824 (estimated locally),1.00 per call) _ZdlPvm/62251 (401890829 (estimated locally),0.37 per call) _ZdlPvm/62251 (214891026 (estimated locally),0.20 per call) _ZdlPvm/62251 (1073741824 (estimated locally),1.00 per call) __builtin_unreachable/62250 (346397698 (estimated locally),0.32 per call) __builtin_unreachable/62250 (708669601 (estimated locally),0.66 per call) __builtin_unreachable/62250 (346397698 (estimated locally),0.32 per call) __builtin_unreachable/62250 (708669601 (estimated locally),0.66 per call) _ZN4llvm18ProfileSummaryInfoD1Ev/51716 (0 (precise),0.00 per call) _Znwm/62248 (1073741824 (estimated locally),1.00 per call) _ZN4llvm18ProfileSummaryInfoD1Ev/51716 (0 (precise),0.00 per call) _ZN4llvm22ProfileSummaryAnalysis3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE/62323 (1073741824 (estimated locally),1.00 per call) (can throw external) during IPA pass: inline /var/tmp/paludis/build/dev-lang-llvm-10.0.0/work/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:290:3: internal compiler error: verify_cgraph_node failed [/log] Preprocessed file (too big to attach here): https://dev.exherbo.org/~marv/GCC10/PassBuilder.ii Let me know if you need any other information etc. [1] https://github.com/llvm/llvm-project/blob/llvmorg-10.0.0/llvm/include/llvm/IR/PassManagerInternal.h#L290