summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr42630.c
blob: 34543dab5e9971439dd66ca1b87a760435d8f216 (plain)
1
2
3
4
5
6
7
8
9
/* { dg-do compile } */
/* { dg-options "-O1 -fvariable-expansion-in-unroller -funroll-loops -fcompare-debug" } */

int sum(int *buf, int len)
{
  int s = 0;
  while (--len > 0) s += *buf++;
  return s;
}