summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr46172.c
blob: c8d1b4759678ba8295200e42de92fa0b35c7efc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-fno-tree-dce -ftree-vectorize" } */

extern short X[];

int foo (int len)
{
  int i;
  int s = 0;
  for (i = 0; i < len; i++)
    s += X[i] * X[i];
  return s;
}