This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] fix out of bound access on hard_regno_nregs
true_regnum (rtx x)
if (GET_CODE (x) == SUBREG)
int base = true_regnum (SUBREG_REG (x));
if (base >= 0 && base < FIRST_PSEUDO_REGISTER)
return base + subreg_regno_offset (REGNO (SUBREG_REG (x)),
GET_MODE (SUBREG_REG (x)),
SUBREG_BYTE (x), GET_MODE (x));
On 2nd reading it looks like we do have a bug in true_regnum.
Assume that X is a SUBREG whos reg is a pseudo_register that has been renumbered
then it looks like we should be passing BASE and not REGNO (SUBREG_REG (x)) onto