1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_double } */
3 /* { dg-additional-options "-fdump-tree-optimized" } */
4 
5 double x[2], a[4], b[4], c[5];
6 
foo()7 void foo ()
8 {
9   a[0] = c[0];
10   a[1] = c[1];
11   a[2] = c[0];
12   a[3] = c[1];
13   b[0] = c[2];
14   b[1] = c[3];
15   b[2] = c[2];
16   b[3] = c[3];
17   x[0] = c[4];
18   x[1] = c[4];
19 }
20 
21 /* We may not vectorize the store to x[] as it accesses c out-of bounds
22    but we do want to vectorize the other two store groups.  */
23 
24 /* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */
25 /* { dg-final { scan-tree-dump-times "x\\\[\[0-1\]\\\] = " 2 "optimized" } } */
26