bug in `find_equiv_reg' and patch
Sun Apr 16 13:39:00 GMT 2000
On Sun, 16 Apr 2000, Denis Chertykov wrote:
> I founded bug in reload.c:find_equiv_reg.
> find_equiv_reg check only first register of valueno and regno as a
> call-clobbered register.
> It's a bug if nregs or valuenregs > 1.
> This bug actual for avr port.
That patch looks correct to me, so if someone could approve it...
Looking at this function, there appears to be another instance of the
/* Reject VALUE if it is one of the regs reserved for reloads.
Reload1 knows how to reuse them anyway, and it would get
confused if we allocated one without its knowledge.
(Now that insns introduced by reload are ignored above,
this case shouldn't happen, but I'm not positive.) */
if (reload_reg_p != 0 && reload_reg_p != (short *) (HOST_WIDE_INT) 1
&& reload_reg_p[valueno] >= 0)
This probably ought to be changed as well.
More information about the Gcc-patches