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; }