1 // PR c++/47388
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-fno-for-scope" }
4 
5 template <int>
6 void
foo()7 foo ()
8 {
9   int a[] = { 1, 2, 3, 4 };
10   for (int i : a)
11     ;
12 }
13 
14 void
bar()15 bar ()
16 {
17   foo <0> ();
18 }
19