https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118146
Bug ID: 118146 Summary: [14/15 Regression] ICE: in riscv_legitimize_move, at config/riscv/riscv.cc:3641 when reinterpreting short vector as _Float16 Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: 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 Created attachment 59931 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59931&action=edit reduced testcase Compiler output: $ riscv64-unknown-linux-gnu-gcc -O -march=rv64gcv -mabi=lp64d testcase.c during RTL pass: expand testcase.c: In function 'foo': testcase.c:7:5: internal compiler error: in riscv_legitimize_move, at config/riscv/riscv.cc:3641 7 | f -= *(_Float16 *)&v; | ~~^~~~~~~~~~~~~~~~~~ 0x35e3fa1 internal_error(char const*, ...) /repo/gcc-trunk/gcc/diagnostic-global-context.cc:517 0x10b5189 fancy_abort(char const*, int, char const*) /repo/gcc-trunk/gcc/diagnostic.cc:1722 0xc2a8ad riscv_legitimize_move(machine_mode, rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/config/riscv/riscv.cc:3641 0x29c3360 gen_movhf(rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/config/riscv/riscv.md:2033 0x13e6220 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*, rtx_def*) const /repo/gcc-trunk/gcc/recog.h:472 0x13e6220 emit_move_ccmode /repo/gcc-trunk/gcc/expr.cc:4454 0x13e6220 emit_move_insn_1(rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/expr.cc:4599 0x13e66a9 emit_move_insn(rtx_def*, rtx_def*) /repo/gcc-trunk/gcc/expr.cc:4750 0x127cdcd emit_library_call_value_1(int, rtx_def*, rtx_def*, libcall_type, machine_mode, int, std::pair<rtx_def*, machine_mode>*) /repo/gcc-trunk/gcc/calls.cc:4704 0x13e79d5 emit_library_call_value(rtx_def*, rtx_def*, libcall_type, machine_mode, rtx_def*, machine_mode) /repo/gcc-trunk/gcc/rtl.h:4425 0x13e79d5 convert_mode_scalar /repo/gcc-trunk/gcc/expr.cc:563 0x13e8fa8 convert_modes(machine_mode, machine_mode, rtx_def*, int) /repo/gcc-trunk/gcc/expr.cc:965 0x13df532 convert_to_mode(machine_mode, rtx_def*, int) /repo/gcc-trunk/gcc/expr.cc:870 0x13df532 expand_expr_real_2(separate_ops const*, rtx_def*, machine_mode, expand_modifier) /repo/gcc-trunk/gcc/expr.cc:9883 0x13e5dc3 expand_expr_real_gassign(gassign*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /repo/gcc-trunk/gcc/expr.cc:11185 0x13e4bf8 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /repo/gcc-trunk/gcc/expr.cc:11367 0x13ef58c expand_expr(tree_node*, rtx_def*, machine_mode, expand_modifier) /repo/gcc-trunk/gcc/expr.h:323 0x13ef58c expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**, rtx_def**, expand_modifier) /repo/gcc-trunk/gcc/expr.cc:9099 0x13db7ca expand_expr_real_2(separate_ops const*, rtx_def*, machine_mode, expand_modifier) /repo/gcc-trunk/gcc/expr.cc:11109 0x13e5dc3 expand_expr_real_gassign(gassign*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) /repo/gcc-trunk/gcc/expr.cc:11185 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-20241218221935-r15-6361-g87f97ffba93a2d-checking-yes-rtl-df-extra-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/15.0.0/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-20241218221935-r15-6361-g87f97ffba93a2d-checking-yes-rtl-df-extra-riscv64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 15.0.0 20241219 (experimental) (GCC)