Ambigious else bug in reg_memtioned_in_mem() gcc/config/i386.c ?
Jeffrey A Law
law@cygnus.com
Sat Feb 21 21:05:00 GMT 1998
In message < 199802211602.QAA00171@iron.rcp.co.uk >you write:
>
>
> I think there is an bug in the routine reg_mentioned_in_mem() in
> gcc/config/i386.c (egcs-980214)
>
> The following code extract from the routine has the 'else' bound to the
> wrong 'if' if the indentation of the
> code indicates the correct intent.
>
> for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
> {
> if (fmt[i] == 'E')
> for (j = XVECLEN (rtl, i) - 1; j >= 0; j--)
> if (reg_mentioned_in_mem (reg, XVECEXP (rtl, i, j)))
> return 1;
>
> else if (fmt[i] == 'e' && reg_mentioned_in_mem (reg, XEXP (rtl,
> i)))
> return 1;
Yup. This is a bug. Can you send a patch?
The "dangling" else should be bound to the outer if.
jeff
More information about the Gcc-bugs
mailing list