1 // PR c++/42056 2 // { dg-do compile { target c++11 } } 3 4 template<int> struct A 5 { 6 int a[auto(1)]; // { dg-error "9:invalid use of" } 7 }; 8 foo()9 template<int> void foo() 10 { 11 int a[auto(1)]; // { dg-error "9:invalid use of" } 12 } 13