1struct s {
2	int c;
3	int a[];
4} s;
5int f;
6
7void fun(void);
8void foo(void)
9{
10	for (f = 1;;)
11		if (s.a[f])
12			fun();
13}
14
15/*
16 * check-name: global var as loop index
17 * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
18 * check-output-ignore
19 * check-output-contains: load\\..*\\[f\\]
20 */
21