Found with an rtl checking enabled build and check. This triggered failures in the gcc.target/riscv/save-restore* tests. We are using XINT to access an XWINT value; INTVAL is the preferred solution.
Since existing tests trigger it we don't need a new one. Tested with riscv32-elf and riscv64-linux cross builds and checks with no regressions. Committed. Jim gcc/ * config/riscv/riscv-sr.c (riscv_sr_match_prologue): Use INTVAL instead of XINT. --- gcc/config/riscv/riscv-sr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv-sr.c b/gcc/config/riscv/riscv-sr.c index e3180efcbcc..744d0c48c33 100644 --- a/gcc/config/riscv/riscv-sr.c +++ b/gcc/config/riscv/riscv-sr.c @@ -115,7 +115,7 @@ riscv_sr_match_prologue (rtx_insn **body) && GET_CODE (XVECEXP (PATTERN (insn), 0, 0)) == UNSPEC_VOLATILE && (GET_CODE (XVECEXP (XVECEXP (PATTERN (insn), 0, 0), 0, 0)) == CONST_INT) - && XINT (XVECEXP (XVECEXP (PATTERN (insn), 0, 0), 0, 0), 0) == 2) + && INTVAL (XVECEXP (XVECEXP (PATTERN (insn), 0, 0), 0, 0)) == 2) return insn; return NULL; -- 2.17.1