summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/vect-alias-check-6.c
blob: 5bb78f8ad5cf7912aff5284351e2ce0156aeaf94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-require-effective-target vect_int } */

#define N 16

struct s { int x[N]; };

void
f1 (struct s *a, struct s *b)
{
  for (int i = 0; i < N - 1; ++i)
    a->x[i + 1] += b->x[i];
}

/* { dg-final { scan-tree-dump {checking that [^\n]* and [^\n]* have different addresses} "vect" } } */
/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */