https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115992
Bug ID: 115992 Summary: [15 regression] ICE when building linux-6.9.10 (RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934) Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- I can't include the original as it required the kernel's GCC plugins to reproduce and I didn't try to kill that dependency, sorry. Only notable patch to mention on this build is that -fno-ext-dce is default, not -fext-dce, for -O2. ``` typedef unsigned u32; u32 gm200_acr_wpr_build_acrgm200_acr_wpr_build__size; int gm200_acr_wpr_build_acrgm200_acr_wpr_build_lsfw_1; void ptrs_0(int, long, u32); void gm200_acr_wpr_build_acrgm200_acr_wpr_build() { u32 offset = 0; for (; gm200_acr_wpr_build_acrgm200_acr_wpr_build_lsfw_1;) { int hdr; u32 _addr = offset, *_data = &hdr; while (gm200_acr_wpr_build_acrgm200_acr_wpr_build__size) { ptrs_0(0, _addr, *_data++); _addr += 4; } offset += sizeof(hdr); } ptrs_0(0, offset, 0); } ``` ``` $ gcc -c gm200.i -O2 -fno-PIE during RTL pass: final gm200.i: In function ‘gm200_acr_wpr_build_acrgm200_acr_wpr_build’: gm200.i:17:1: internal compiler error: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 17 | } | ^ 0x55558ecf32c7 internal_error(char const*, ...) /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/diagnostic-global-context.cc:491 0x55558e598015 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, char const*) /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/rtl.cc:770 0x55558ddfd393 rhs_regno(rtx_def const*) /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/rtl.h:1934 0x55558ddfd393 print_reg(rtx_def*, int, _IO_FILE*) /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/config/i386/i386.cc:13388 0x55558f5a5e15 ix86_print_operand_address_as /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/config/i386/i386.cc:14505 0x55558f46de0d ix86_print_operand_address /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/config/i386/i386.cc:14575 0x55558f46de0d output_address(machine_mode, rtx_def*) /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/final.cc:3647 0x55558f46de0d ix86_print_operand(_IO_FILE*, rtx_def*, int) /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/config/i386/i386.cc:13581 0x55558f46d704 output_operand(rtx_def*, int) /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/final.cc:3631 0x55558f46b8c9 output_asm_insn(char const*, rtx_def**) /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/final.cc:3524 0x55558f46833d final_scan_insn_1 /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/final.cc:2840 0x55558f45dbcc final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/final.cc:2886 0x55558f45dbcc final_1 /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/final.cc:1977 0x55558f7a2d3f rest_of_handle_final /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/final.cc:4239 0x55558f7a2d3f execute /usr/src/debug/sys-devel/gcc-15.0.0_pre20240714-r1/gcc-15-20240714/gcc/final.cc:4317 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/15/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-15.0.0_pre20240714-r1/work/gcc-15-20240714/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/15 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/15/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15 --disable-silent-rules --disable-dependency-tracking --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/15/python --enable-languages=c,c++,fortran --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 15.0.0_pre20240714-r1 p5' --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-libgomp --disable-libssp --disable-libada --enable-cet --disable-systemtap --disable-valgrind-annotations --disable-vtable-verify --disable-libvtv --with-zstd --without-isl --enable-default-pie --enable-host-pie --enable-host-bind-now --enable-default-ssp --disable-fixincludes --with-build-config='bootstrap-O3 bootstrap-lto bootstrap-cet' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20240714 (experimental) (Gentoo Hardened 15.0.0_pre20240714-r1 p5) ```