https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111161
Bug ID: 111161 Summary: [13 Regression] ICE: RTL check: expected code 'const_int', have 'reg' in riscv_print_operand, at config/riscv/riscv.cc:4394 during build Product: gcc Version: 13.2.1 Status: UNCONFIRMED Keywords: build, ice-checking, ice-on-valid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Target Milestone: --- Host: x86_64-pc-linux-gnu Target: riscv64-unknown-linux-gnu Build: x86_64-pc-linux-gnu I am currently failing to build the riscv64-unknown-linux-gnu cross-compiler on the gcc-13-branch with RTL checking enabled: Configure command line: /repo/gcc-13-branch//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --with-ppl --with-isl --with-isa-spec=2.2 --with-sysroot=/usr/riscv64-unknown-linux-gnu --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=riscv64-unknown-linux-gnu --with-ld=/usr/bin/riscv64-unknown-linux-gnu-ld --with-as=/usr/bin/riscv64-unknown-linux-gnu-as --disable-multilib --disable-libstdcxx-pch --prefix=/repo/gcc-13-branch//binary-13-branch-20230826002206-gc1732638180-checking-yes-rtl-df-extra-riscv64 Results in: ... checking whether ln -s works... yes checking for riscv64-unknown-linux-gnu-gcc... /repo/build-gcc-riscv64/./gcc/xgcc -B/repo/build-gcc-riscv64/./gcc/ -B/repo/gcc-13-branch//binary-13-branch-20230826002206-gc1732638180-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/bin/ -B/repo/gcc-13-branch//binary-13-branch-20230826002206-gc1732638180-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/lib/ -isystem /repo/gcc-13-branch//binary-13-branch-20230826002206-gc1732638180-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/include -isystem /repo/gcc-13-branch//binary-13-branch-20230826002206-gc1732638180-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/sys-include checking for suffix of object files... configure: error: in `/repo/build-gcc-riscv64/riscv64-unknown-linux-gnu/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details make[1]: *** [Makefile:14265: configure-target-libgcc] Error 1 make[1]: Leaving directory '/repo/build-gcc-riscv64' make: *** [Makefile:1041: all] Error 2 And config.log shows: configure:3576: /repo/build-gcc-riscv64/./gcc/xgcc -B/repo/build-gcc-riscv64/./gcc/ -B/repo/gcc-13-branch//binary-13-branch-20230826002206-gc1732638180-checking-yes-rtl-df-extra-riscv64/risc v64-unknown-linux-gnu/bin/ -B/repo/gcc-13-branch//binary-13-branch-20230826002206-gc1732638180-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/lib/ -isystem /repo/gcc-13-branch// binary-13-branch-20230826002206-gc1732638180-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/include -isystem /repo/gcc-13-branch//binary-13-branch-20230826002206-gc1732638180-checking-yes-rtl-df-extra-riscv64/riscv64-unknown-linux-gnu/sys-include -o conftest -g -O2 conftest.c >&5 during RTL pass: final conftest.c: In function 'main': conftest.c:16:1: internal compiler error: RTL check: expected code 'const_int', have 'reg' in riscv_print_operand, at config/riscv/riscv.cc:4394 16 | } | ^ 0x7a2fcb rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int, char const*) /repo/gcc-13-branch/gcc/rtl.cc:916 0x847f34 riscv_print_operand /repo/gcc-13-branch/gcc/config/riscv/riscv.cc:4394 0xcd3fd8 output_operand(rtx_def*, int) /repo/gcc-13-branch/gcc/final.cc:3632 0xcd4a38 output_asm_insn(char const*, rtx_def**) /repo/gcc-13-branch/gcc/final.cc:3544 0xcd8e12 output_asm_insn(char const*, rtx_def**) /repo/gcc-13-branch/gcc/final.cc:3421 0xcd8e12 final_scan_insn_1 /repo/gcc-13-branch/gcc/final.cc:2841 0xcd91ab final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) /repo/gcc-13-branch/gcc/final.cc:2887 0xcd93e4 final_1 /repo/gcc-13-branch/gcc/final.cc:1979 0xcda028 rest_of_handle_final /repo/gcc-13-branch/gcc/final.cc:4240 0xcda028 execute /repo/gcc-13-branch/gcc/final.cc:4318 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. This only affects gcc-13-branch, probably only with RTL checking enabled. I can't find the conftest.c file that is failing to build.