https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112552
Bug ID: 112552 Summary: [14 Regression] ICE: in require, at machmode.h:313 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: patrick at rivosinc dot com Target Milestone: --- Created attachment 56596 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56596&action=edit -freport-bug output ./bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O3 --param riscv-autovec-preference=fixed-vlmax -S ../testcase.c -freport-bug ../testcase.c: In function 'h': ../testcase.c:7:15: warning: initialization of 'char *' from incompatible pointer type 'void (*)()' [-Wincompatible-pointer-types] 7 | char *f = h; | ^ ../testcase.c:8:16: warning: comparison between pointer and integer 8 | e = b || g > 1 ? g : b; | ^ during RTL pass: expand ../testcase.c:5:6: internal compiler error: in require, at machmode.h:313 5 | void h() { | ^ 0x9acb6e opt_mode<machine_mode>::require() const ../../../gcc/gcc/machmode.h:313 0x9acb6e opt_mode<machine_mode>::require() const ../../../gcc/gcc/machmode.h:311 0x9acb6e riscv_legitimize_move(machine_mode, rtx_def*, rtx_def*) ../../../gcc/gcc/config/riscv/riscv.cc:2543 0x19c8c62 gen_movqi(rtx_def*, rtx_def*) ../../../gcc/gcc/config/riscv/riscv.md:2132 0xd35d27 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*, rtx_def*) const ../../../gcc/gcc/recog.h:411 0xd35d27 emit_move_insn_1(rtx_def*, rtx_def*) ../../../gcc/gcc/expr.cc:4164 0xd36174 emit_move_insn(rtx_def*, rtx_def*) ../../../gcc/gcc/expr.cc:4334 0xd0aca1 force_reg(machine_mode, rtx_def*) ../../../gcc/gcc/explow.cc:683 0xd15581 store_fixed_bit_field_1 ../../../gcc/gcc/expmed.cc:1320 0xd19700 store_fixed_bit_field ../../../gcc/gcc/expmed.cc:1245 0xd1a408 store_integral_bit_field ../../../gcc/gcc/expmed.cc:1103 0xd1a408 store_bit_field_1 ../../../gcc/gcc/expmed.cc:884 0xd1a9bb store_bit_field(rtx_def*, poly_int<2u, unsigned long>, poly_int<2u, unsigned long>, poly_int<2u, unsigned long>, poly_int<2u, unsigned long>, machine_mode, rtx_def*, bool, bool) ../../../gcc/gcc/expmed.cc:1193 0xd4552e store_field ../../../gcc/gcc/expr.cc:7833 0xd439c7 store_constructor(tree_node*, rtx_def*, int, poly_int<2u, long>, bool) ../../../gcc/gcc/expr.cc:7588 0xd46398 expand_constructor ../../../gcc/gcc/expr.cc:8931 0xd320d7 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../../gcc/gcc/expr.cc:11219 0xd32857 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../../gcc/gcc/expr.cc:10828 0xe590f2 expand_normal(tree_node*) ../../../gcc/gcc/expr.h:316 0xe590f2 expand_vec_cond_mask_optab_fn ../../../gcc/gcc/internal-fn.cc:3111 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Preprocessed source stored into /tmp/ccOhxn1n.out file, please attach this to your bugreport. Testcase: int a, c, d; void (*b)(); void (*e)(); void g(); void h() { for (; a; --a) { char *f = h; e = b || g > 1 ? g : b; d |= !e; *f ^= c; } } Bisected to r14-4077-g86451305d8b Attached -freport-bug output