1 struct s { 2 int c; 3 int a[]; 4 } s; 5 int f; 6 7 void fun(void); 8 void 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 */