summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr28187.c
blob: bc3b62d3362bce2111fe40420da64dc461997b58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O -ftree-vrp -fwrapv" } */

extern void bar(int);
void checkgroups(int last, int verbose) 
{
    int window = 0;
    int outstanding = 0;
    while (window < last || outstanding) {
	while (outstanding < 47 && window < last) {
	    if (window < last) { 
		outstanding++; 
		if (verbose)
		    bar(window);
		bar(window++);
	    }
	}
	if (outstanding > 0)
	    bar(0);
    }
}