aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/mem2reg/loop01-global.c
blob: b67981378d7e20299c0ed1fa089aba50b964fb0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern int g;

void fun(void);
void loop01(void)
{
	int i;
	for (i = 0; i <= 2;)
		if (g)
			fun();
}

/*
 * check-name: loop01 global
 * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
 * check-output-ignore
 * check-output-excludes: load\\..*\\[i\\]
 * check-output-contains: load\\..*\\[g\\]
 */