xref: /illumos-gate/usr/src/tools/smatch/src/validation/mem2reg/loop01-global.c (revision 74e12c43fe52f2c30f36e65a4d0fb0e8dfd7068a)
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