aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/loop-40.c
blob: 36db5657a9a0dec0c890a47bad3da5d36c24fbc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-ch2-details" } */

int mymax2(int *it, int *end)
{
  int max = *it;
  while (++it != end)
    if (*it > max)
      max = *it;
  return max;
}

/* { dg-final { scan-tree-dump "Duplicating header" "ch2" } } */