This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR tree-optimization/49771
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: ira dot rosen at linaro dot org (Ira Rosen)
- Cc: gcc-patches at gcc dot gnu dot org, patches at linaro dot org (Patch Tracking)
- Date: Wed, 20 Jul 2011 20:35:26 +0200 (CEST)
- Subject: Re: [patch] Fix PR tree-optimization/49771
Ira Rosen wrote:
> PR tree-optimization/49771
> * gcc.dg/vect/pr49771.c: New test.
This test fails (with wrong code) on spu-elf ...
> +int
> +foo (void)
> +{
> + int j;
> + int i;
> + for (i = 0; i < 1000; i++)
> + for (j = 0; j < 1000; j++)
> + a[j] = a[i] + 1;
> + return a[0];
> +}
> +
> +int
> +main (void)
> +{
> + int res = foo ();
> + if (res != 1999)
> + abort ();
> + return 0;
> +}
The return value of foo with vectorization is 1249 instead
of 1999 for some reason.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com