PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-alias-check-4.c
blob1e5fc273ec1ab47bfd9a92feed2a4f44dae95501
1 /* { dg-do compile } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-additional-options "--param vect-max-version-for-alias-checks=0" } */
5 #define N 16
7 struct s1 { int a[N]; };
8 struct s2 { struct s1 b; int c; };
9 struct s3 { int d; struct s1 e; };
10 union u { struct s2 f; struct s3 g; };
12 /* We allow a and b to overlap arbitrarily. */
14 void
15 f1 (int a[][N], int b[][N])
17 for (int i = 0; i < N; ++i)
18 a[0][i] += b[0][i];
21 void
22 f2 (union u *a, union u *b)
24 for (int i = 0; i < N; ++i)
25 a->f.b.a[i] += b->g.e.a[i];
28 void
29 f3 (struct s1 *a, struct s1 *b)
31 for (int i = 0; i < N - 1; ++i)
32 a->a[i + 1] += b->a[i];
35 /* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */