aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ivopts-7.c
blob: 44f5603d4f5b8da6c759e8732503638131b0fca8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile { target lp64 } } */
/* { dg-options "-O2 -fdump-tree-ivopts-details" } */

int*
foo (int* mem, int beg, int end, int val)
{
  int i;
  for (i = beg; i < end; i++)
    if (mem[i] == val) 
      return &mem[i];
  return 0;
}
/* { dg-final { scan-tree-dump "inv_expr \[0-9\]: \\t\\(unsigned long\\) \\(\\(unsigned int\\) end_\[0-9\]\\(D\\) - \\(unsigned int\\) beg_\[0-9\]\\(D\\)\\)" "ivopts" } } */