On 20 July 2011 21:35, Ulrich Weigand <uweig...@de.ibm.com> wrote: > 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.
I reproduced the failure. It occurs without Richard's (http://gcc.gnu.org/ml/gcc-patches/2011-07/msg01022.html) and this patches too. Obviously the vectorized loop is executed, but at the moment I don't understand why. I'll have a better look on Sunday. Ira > > Bye, > Ulrich > > -- > Dr. Ulrich Weigand > GNU Toolchain for Linux on System z and Cell BE > ulrich.weig...@de.ibm.com >