https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120080
Bug ID: 120080 Summary: [16 regression] ICE when building llvm-20.1.3 (find_bit_tests, at tree-switch-conversion.cc:1799) Product: gcc Version: 16.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Created attachment 61279 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61279&action=edit NVPTXInstPrinter.cpp.ii.xz ``` FAILED: [code=1] lib/Target/NVPTX/MCTargetDesc/CMakeFiles/LLVMNVPTXDesc.dir/NVPTXInstPrinter.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -m32 -mfpmath=sse -DLLVM_EXPORTS -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.3/work/llvm_build-abi_x86_32.x86/lib/Target/NVPTX/MCTargetDesc -I/var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.3/work/llvm/lib/Target/NVPTX/MCTargetDesc -I/var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.3/work/llvm/lib/Target/NVPTX -I/var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.3/work/llvm_build-abi_x86_32.x86/lib/Target/NVPTX -I/var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.3/work/llvm_build-abi_x86_32.x86/include -I/var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.3/work/llvm/include -DNDEBUG -O3 -march=native -mtls-dialect=gnu2 -fno-semantic-interposition -g1 -pipe -fcf-protection=none -fdiagnostics-color=always -fdiagnostics-urls=never -frecord-gcc-switches -fdiagnostics-details -fdiagnostics-set-output=text:experimental-nesting=yes -Wa,-O2 -Wa,-mtune=znver2 -Warray-bounds --param=ggc-min-expand=120 -Wstrict-aliasing -Wfree-nonheap-object -Wuninitialized -Wmaybe-uninitialized -Wreturn-type -fno-lto -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -std=c++17 -fvisibility=hidden -fdiagnostics-color=always -MD -MT lib/Target/NVPTX/MCTargetDesc/CMakeFiles/LLVMNVPTXDesc.dir/NVPTXInstPrinter.cpp.o -MF lib/Target/NVPTX/MCTargetDesc/CMakeFiles/LLVMNVPTXDesc.dir/NVPTXInstPrinter.cpp.o.d -o lib/Target/NVPTX/MCTargetDesc/CMakeFiles/LLVMNVPTXDesc.dir/NVPTXInstPrinter.cpp.o -c /var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.3/work/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp during GIMPLE pass: switchlower /var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.3/work/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp: In member function ‘void llvm::NVPTXInstPrinter::printLdStCode(const llvm::MCInst*, int, llvm::raw_ostream&, const char*)’: /var/tmp/portage.notmp/portage/llvm-core/llvm-20.1.3/work/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp:231:6: internal compiler error: in find_bit_tests, at tree-switch-conversion.cc:1799 231 | void NVPTXInstPrinter::printLdStCode(const MCInst *MI, int OpNum, | ^~~~~~~~~~~~~~~~ 0x5f7069a50263 internal_error(char const*, ...) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/diagnostic-global-context.cc:517 0x5f7069a31b58 fancy_abort(char const*, int, char const*) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/diagnostic.cc:1748 0x5f706881531f tree_switch_conversion::bit_test_cluster::find_bit_tests(vec<tree_switch_conversion::cluster*, va_heap, vl_ptr>&, int) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-switch-conversion.cc:1799 0x5f706881531f tree_switch_conversion::bit_test_cluster::find_bit_tests(vec<tree_switch_conversion::cluster*, va_heap, vl_ptr>&, int) /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-switch-conversion.cc:1781 0x5f706a37b05c tree_switch_conversion::switch_decision_tree::analyze_switch_statement() /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-switch-conversion.cc:2261 0x5f706a120fb7 execute /usr/src/debug/sys-devel/gcc-16.0.9999/gcc-16.0.9999/gcc/tree-switch-conversion.cc:3060 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://bugs.gentoo.org/> for instructions. ``` --- ``` Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/16/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/16 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/16/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/16/include/g++-v16 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/16/python --enable-libphobos --enable-objc-gc --enable-languages=c,c++,d,objc,obj-c++,fortran,ada,cobol,m2,rust --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --disable-libunwind-exceptions --enable-checking=yes,extra,rtl --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 16.0.9999 p, commit 93f36c1b921e531fd4cdc6aee7af55e1d6eb9d39' --with-gcc-major-version-only --enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all --enable-offload-defaulted --enable-offload-targets=nvptx-none --enable-libgomp --disable-libssp --enable-libada --disable-cet --disable-systemtap --enable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --with-isl --disable-isl-version-check --enable-default-pie --enable-host-pie --enable-host-bind-now --enable-default-ssp --disable-fixincludes --with-gxx-libcxx-include-dir=/usr/include/c++/v1 --with-build-config='bootstrap-O3 bootstrap-lto' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 16.0.0 20250502 (experimental) dba5d112691a3e10b722468d94fffeda0fdbb818 (Gentoo Hardened 16.0.9999 p, commit 93f36c1b921e531fd4cdc6aee7af55e1d6eb9d39) ```