aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/vect/pr58513.cc
blob: 08a175c8e740600dce01cdd794cb05f6b5151633 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// { dg-do compile }
// { dg-require-effective-target vect_int }

static int op (const int& x, const int& y) { return x + y; }

void foo(int* a)
{
  for (int i = 0; i < 1000; ++i)
    a[i] = op(a[i], 1);
}

// { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } }
// { dg-final { cleanup-tree-dump "vect" } }