1 /* PR target/82703 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -fno-tree-sra -ftree-vectorize" } */
4 
5 __attribute__((noinline, noclone)) void
compare(const double * p,const double * q)6 compare (const double *p, const double *q)
7 {
8   for (int i = 0; i < 3; ++i)
9     if (p[i] != q[i])
10       __builtin_abort ();
11 }
12 
13 double vr[3] = { 4, 4, 4 };
14 
15 int
main()16 main ()
17 {
18   double v1[3] = { 1, 2, 3 };
19   double v2[3] = { 3, 2, 1 };
20   double v3[3];
21   __builtin_memcpy (v3, v1, sizeof (v1));
22   for (int i = 0; i < 3; ++i)
23     v3[i] += v2[i];
24   for (int i = 0; i < 3; ++i)
25     v1[i] += v2[i];
26   compare (v3, vr);
27   return 0;
28 }
29