xref: /illumos-gate/usr/src/tools/smatch/src/validation/mem2reg/loop02-global.c (revision 3665ce8aeee26b1a84fb98951ef011e0779e1ae2)
1 int i;
2 
3 int foo(void)
4 {
5 	int j = 1;
6 	i = 6;
7 
8 	do {
9 		if (i != 6)
10 			i++;
11 		i++;
12 	} while (i != j);
13 
14 	return j;
15 }
16 
17 /*
18  * check-name: loop02 global
19  * check-command: test-linearize -Wno-decl $file
20  * check-output-ignore
21  * check-output-excludes: load\\.
22  */
23