http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50435

--- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-09-18 
10:54:14 UTC ---
> Looks like there is a difference ;)
> I guess it succeeds with the patch to avoid loop vectorization and the fix of 
> restrict together?

Here is the patched test that gives no failure (i.e., yours and the change to
restrict):

--- ../_clean/gcc/testsuite/gcc.dg/vect/bb-slp-25.c    2011-09-15
13:34:18.000000000 +0200
+++ gcc/testsuite/gcc.dg/vect/bb-slp-25.c    2011-09-18 12:42:21.000000000
+0200
@@ -9,7 +9,7 @@

 short src[N], dst[N];

-void foo (short * __restrict dst, short * __restrict src, int h, int stride)
+void foo (short *__restrict__ dst, short *__restrict__ src, int h, int stride,
int dummy)
 {
   int i;
   h /= 16;
@@ -25,6 +25,8 @@ void foo (short * __restrict dst, short 
       dst[7] += A*src[7] + src[7+stride];
       dst += 8;
       src += 8;
+      if (dummy == 32)
+        abort ();
    }
 }

@@ -41,7 +43,7 @@ int main (void)
        src[i] = i;
     }

-  foo (dst, src, N, 8);
+  foo (dst, src, N, 8, 0);

   for (i = 0; i < N/2; i++)
     {

Reply via email to