xref: /illumos-gate/usr/src/tools/smatch/src/validation/mem2reg/loop01-global.c (revision b69c34dad3717624ff6b4f32b71014ee05b6a678)
1 extern int g;
2 
3 void fun(void);
4 void loop01(void)
5 {
6 	int i;
7 	for (i = 0; i <= 2;)
8 		if (g)
9 			fun();
10 }
11 
12 /*
13  * check-name: loop01 global
14  * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
15  * check-output-ignore
16  * check-output-excludes: load\\..*\\[i\\]
17  * check-output-contains: load\\..*\\[g\\]
18  */
19