https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79912
--- Comment #4 from Kito Cheng <npickito at gmail dot com> --- Hi Eric: >> vfscanf.c: In function ‘_IO_vfscanf_internal’: >> vfscanf.c:3050:1: error: unable to generate reloads for: >> (insn 11026 11523 5651 1080 (set (reg:QI 3515) >> (mem/c:QI (plus:SI (reg/f:SI 65 frame) >> (const_int -1568 [0xfffffffffffff9e0])) [65 %sfp+-1504 S1 >> A32])) "vfscanf.c":266 138 {*movqi_internal} >> (expr_list:REG_DEAD (reg:QI 3956) >> (nil))) > I presume that it's not a valid address? If so, why isn't it valid? RISC-V have 12-bit signed immediate for offset (2047~-2048), so it's should be valid address. Here is another simple case in gcc testsuite: riscv32-unknown-linux-gnu-gcc gcc/testsuite/gcc.c-torture/compile/pr52750.c -O0 -march=rv32imafd -mabi=ilp32d /home/kito/riscv-workspace/riscv-gnu-toolchain/riscv-gcc/gcc/testsuite/gcc.c-torture/compile/pr52750.c: In function ‘foo’: /home/kito/riscv-workspace/riscv-gnu-toolchain/riscv-gcc/gcc/testsuite/gcc.c-torture/compile/pr52750.c:11:1: error: unable to generate reloads for: } ^ (insn 194 197 145 2 (set (reg:QI 180) (mem/c:QI (plus:SI (reg/f:SI 65 frame) (const_int -268 [0xfffffffffffffef4])) [2 %sfp+-204 S1 A32])) "/home/kito/riscv-workspace/riscv-gnu-toolchain/riscv-gcc/gcc/testsuite/gcc.c-torture/compile/pr52750.c":10 138 {*movqi_internal} (expr_list:REG_DEAD (reg:QI 183) (nil))) /home/kito/riscv-workspace/riscv-gnu-toolchain/riscv-gcc/gcc/testsuite/gcc.c-torture/compile/pr52750.c:11:1: internal compiler error: in curr_insn_transform, at lra-constraints.c:3785 0xa9f298 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../../../src/gcc/trunk/gcc/rtl-error.c:108 0x9a2001 curr_insn_transform ../../../src/gcc/trunk/gcc/lra-constraints.c:3785 0x9a3286 lra_constraints(bool) ../../../src/gcc/trunk/gcc/lra-constraints.c:4754 0x98cf7c lra(_IO_FILE*) ../../../src/gcc/trunk/gcc/lra.c:2392 0x942ddb do_reload ../../../src/gcc/trunk/gcc/ira.c:5451 0x942ddb execute ../../../src/gcc/trunk/gcc/ira.c:5635 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.