1 /* PR tree-optimization/56443 */
2 /* { dg-do run } */
3 /* { dg-options "-ftree-vectorize" } */
4 
5 extern void abort (void);
6 typedef int myint __attribute__ ((__aligned__ (16)));
7 
8 int a1[1024] __attribute__ ((__aligned__ (16)));
9 int a2[1024] __attribute__ ((__aligned__ (16)));
10 
11 __attribute__((noinline, noclone)) void
test(int n,myint * __restrict__ p1,myint * __restrict__ p2)12 test (int n, myint * __restrict__ p1, myint * __restrict__ p2)
13 {
14   while (n--)
15     *p1++ = *p2++ + 1;
16 }
17 
18 int
main()19 main ()
20 {
21   int n;
22   for (n = 0; n < 1024; n++)
23     a2[n] = n;
24   test (1024, a1, a2);
25   for (n = 0; n < 1024; n++)
26     if (a1[n] != a2[n] + 1)
27       abort ();
28   return 0;
29 }
30