This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix out-of-bounds array access in sh


Paolo Bonzini <bonzini@gnu.org> wrote:
> The LEGITIMIZE_ADDRESS patch had a spurious difference for
> gcc.c-torture/compile/20021119-1.c on sh (which I identified before
> posting the patch, hence the white lie in the message...).
> 
> The code is
> 
> void foo()
> {
>   unsigned int i, j;
>   j = (i >> 240);
> }
> 
> and the difference is due to different choices in
> sh_dynamicalize_shift_p when accessing shift_insns[240].  This patch
> fixes all others possible array accesses (I think) so that they truncate
> the shift count.
> 
> Ok for mainline?

OK.  Thanks for the patch!

Regards,
	kaz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]