https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119275
Bug ID: 119275 Summary: ICE: in gen_lowpart_general, at rtlhooks.cc:57 with -O2 -march=rv64gv -mrvv-vector-bits=zvl Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: rtl-optimization 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 Created attachment 60744 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60744&action=edit reduced testcase Compiler output: $ riscv64-unknown-linux-gnu-gcc -O2 -march=rv64gv -mrvv-vector-bits=zvl testcase.c during RTL pass: reload testcase.c: In function 'foo': testcase.c:23:1: internal compiler error: in gen_lowpart_general, at rtlhooks.cc:57 23 | } | ^ 0x364e6c1 internal_error(char const*, ...) /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517 0x10e4f17 fancy_abort(char const*, int, char const*) /repo/gcc-trunk/gcc/diagnostic.cc:1722 0xb8e9ab gen_lowpart_general(machine_mode, rtx_def*) /repo/gcc-trunk/gcc/rtlhooks.cc:57 0x1cef4d8 riscv_legitimize_move(machine_mode, rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/config/riscv/riscv.cc:3601 0x25e5800 gen_movdi(rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/config/riscv/riscv.md:2492 0x141bb80 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*, rtx_def*) const /repo/gcc-trunk/gcc/recog.h:472 0x141bb80 emit_move_ccmode /repo/gcc-trunk/gcc/expr.cc:4455 0x141bb80 emit_move_insn_1(rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/expr.cc:4600 0x141c009 emit_move_insn(rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/expr.cc:4751 0x1672ffc lra_emit_move(rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/lra.cc:509 0x168d0c3 curr_insn_transform /repo/gcc-trunk/gcc/lra-constraints.cc:4812 0x168ef53 lra_constraints(bool) /repo/gcc-trunk/gcc/lra-constraints.cc:5569 0x1676624 lra(_IO_FILE*, int) /repo/gcc-trunk/gcc/lra.cc:2449 0x161fcef do_reload /repo/gcc-trunk/gcc/ira.cc:5987 0x161fcef execute /repo/gcc-trunk/gcc/ira.cc:6175 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. $ riscv64-unknown-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-riscv64/bin/riscv64-unknown-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-20250313133031-r15-8032-g6e47e6d48844ee-checking-yes-rtl-df-extra-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/15.0.1/lto-wrapper 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 --enable-libsanitizer --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-20250313133031-r15-8032-g6e47e6d48844ee-checking-yes-rtl-df-extra-riscv64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.1 20250313 (experimental) (GCC)