summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/no-tree-pre-pr45241.c
blob: 289a930cd7babfb9ee09311f3f63c66f9072a679 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR tree-optimization/45241 */
/* { dg-do compile } */
/* { dg-options "-ftree-vectorize" } */

int
foo (short x)
{
  short i, y;
  int sum;

  for (i = 0; i < x; i++)
    y = x * i;

  for (i = x; i > 0; i--)
    sum += y;

  return sum;
}

/* { dg-final { cleanup-tree-dump "vect" } } */