aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/vect/pr49352.c
blob: d8e0bae04625179606d76ae75c843bb3420e28ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* PR tree-optimization/49352 */
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -fcompare-debug" } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */

int
foo (int *x, int *y, int n)
{
  int i, j;
  int dot = 0;
  for (i = 0; i < n; i++)
    for (j = 0; j < 2; j++)
      dot += *(x++) * *(y++);
  return dot;
}