https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109725

            Bug ID: 109725
           Summary: [14 Regression] ICE: RTL check: expected code
                    'const_int', have 'reg' in riscv_print_operand, at
                    config/riscv/riscv.cc:4430
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: build, 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

RTL checking might need to be enabled.
This currently breaks build with RTL checking enabled.

Compiler output:
$ echo 'void foo(void) {}' | /repo/build-gcc-trunk-riscv64/./gcc/cc1 -quiet -
during RTL pass: final
<stdin>: In function 'foo':
<stdin>:1:17: internal compiler error: RTL check: expected code 'const_int',
have 'reg' in riscv_print_operand, at config/riscv/riscv.cc:4430
0x8296e1 rtl_check_failed_code1(rtx_def const*, rtx_code, char const*, int,
char const*)
        /repo/gcc-trunk/gcc/rtl.cc:916
0x8cf1d3 riscv_print_operand
        /repo/gcc-trunk/gcc/config/riscv/riscv.cc:4430
0xdb4aa8 output_operand(rtx_def*, int)
        /repo/gcc-trunk/gcc/final.cc:3632
0xdb5508 output_asm_insn(char const*, rtx_def**)
        /repo/gcc-trunk/gcc/final.cc:3544
0xdb98f2 output_asm_insn(char const*, rtx_def**)
        /repo/gcc-trunk/gcc/final.cc:3421
0xdb98f2 final_scan_insn_1
        /repo/gcc-trunk/gcc/final.cc:2841
0xdb9c8b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
        /repo/gcc-trunk/gcc/final.cc:2887
0xdb9ec4 final_1
        /repo/gcc-trunk/gcc/final.cc:1979
0xdbab08 rest_of_handle_final
        /repo/gcc-trunk/gcc/final.cc:4240
0xdbab08 execute
        /repo/gcc-trunk/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.

$ /repo/build-gcc-trunk-riscv64/./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/repo/build-gcc-trunk-riscv64/./gcc/xgcc
Target: riscv64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//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-trunk//binary-trunk-r14-467-20230504024653-g8c361179c01-checking-yes-rtl-df-extra-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20230504 (experimental) (GCC)

Reply via email to