summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/doloop-2.c
blob: 115ec742ba314a802fcb6398e56104d9bc6f2798 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do run } */
/* { dg-options "-O2" } */
extern void abort (void);
unsigned global_iters;

void bi_reverse(int len)
{
    do {
	global_iters++;
    } while (--len > 0);
}

int main()
{
  bi_reverse(5);
  if (global_iters != 5)
    abort ();
  return 0;
}