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