summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vect/pr46663.c
blob: 42a1ffbbc4b70914b091a35c666045287e71f4a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O -ftree-vectorize -fdump-tree-vect-details -fexceptions" } */

typedef __attribute__ ((const)) int (*bart) (void);

int foo (bart bar, int m)
{
  int i, j = 0;
  for (i = 0; i < m; i++)
    j += bar();
  return j;
}

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