This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix out-of-bounds array access in sh
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: bonzini at gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 18 Apr 2009 12:29:28 +0900 (JST)
- Subject: Re: [PATCH] Fix out-of-bounds array access in sh
- References: <49E886E7.email@example.com>
Paolo Bonzini <firstname.lastname@example.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. 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!