This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix array overflow in gcc.dg/vect/no-vfa-vect-depend-2.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Feb 2014 09:09:10 +0100
- Subject: Re: [patch] Fix array overflow in gcc.dg/vect/no-vfa-vect-depend-2.c
- Authentication-results: sourceware.org; auth=none
- References: <ye6qwqhagysd dot fsf at elbrus2 dot mtv dot corp dot google dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Feb 04, 2014 at 04:59:14PM -0800, Paul Pluzhnikov wrote:
> gcc/testsuite/ChangeLog:
>
> 2014-02-04 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> * gcc.dg/vect/no-vfa-vect-depend-2.c (main1): Fix buffer
> overflow.
Ok, thanks.
> --- gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c (revision 207487)
> +++ gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c (working copy)
> @@ -15,7 +15,7 @@
> int i;
>
> /* Not vectorizable due to data dependence: dependence distance 1. */
> - for (i = N - 1; i >= 0; i--)
> + for (i = N - 2; i >= 0; i--)
> {
> ia[i] = ia[i+1] * 4;
> }
> @@ -28,7 +28,7 @@
> }
>
> /* Vectorizable. Dependence distance -1. */
> - for (i = N - 1; i >= 0; i--)
> + for (i = N - 2; i >= 0; i--)
> {
> ib[i+1] = ib[i] * 4;
> }
Jakub