The REGNO_OK_FOR_BASE_P is using reg_renumber array. However, it is
not always defined. Use it only when it is defined.
gcc/
2020-12-29 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.h (REGNO_OK_FOR_BASE_P): Check if defined
reg_renumber.
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com>
|| ((REGNO) == ARG_POINTER_REGNUM) \
|| ((REGNO) == FRAME_POINTER_REGNUM) \
|| ((REGNO) == PCL_REG) \
- || ((unsigned) reg_renumber[REGNO] < 29) \
+ || (reg_renumber && ((unsigned) reg_renumber[REGNO] < 29)) \
|| ((unsigned) (REGNO) == (unsigned) arc_tp_regno) \
|| (fixed_regs[REGNO] == 0 && IN_RANGE (REGNO, 32, 59)) \
|| (fixed_regs[REGNO] == 0 && (REGNO) == R30_REG))