https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116131
Bug ID: 116131 Summary: [14/15 Regression] RISC-V: Unrecognizable insn with xtheadmemidx Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: patrick at rivosinc dot com Target Milestone: --- Testcase: volatile long long a; int b; int c[1]; void d() { c[a] = b; } Command/backtrace: > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/riscv64-unknown-linux-gnu-gcc > -march=rv32ixtheadmemidx -mabi=ilp32 -O1 red.c -c -S -o /dev/null red.c: In function 'd': red.c:4:22: error: unrecognizable insn: 4 | void d() { c[a] = b; } | ^ (insn 17 13 0 2 (set (mem:SI (plus:SI (reg/f:SI 141) (ashift:SI (subreg:SI (reg:DI 134 [ a.0_1 ]) 0) (const_int 2 [0x2]))) [0 S4 A32]) (reg:SI 143 [ b ])) "red.c":4:17 -1 (nil)) during RTL pass: subreg3 red.c:4:22: internal compiler error: in extract_insn, at recog.cc:2848 0x2ddf545 internal_error(char const*, ...) ../../../gcc/gcc/diagnostic-global-context.cc:491 0xc4f10e fancy_abort(char const*, int, char const*) ../../../gcc/gcc/diagnostic.cc:1755 0xae2985 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../../gcc/gcc/rtl-error.cc:108 0xae29a7 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../../../gcc/gcc/rtl-error.cc:116 0xae125b extract_insn(rtx_insn*) ../../../gcc/gcc/recog.cc:2848 0x2800737 decompose_multiword_subregs ../../../gcc/gcc/lower-subreg.cc:1584 0x28016f1 execute ../../../gcc/gcc/lower-subreg.cc:1849 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. Godbolt: https://godbolt.org/z/Gc1a5Mxfd Found via fuzzer.