1 // PR c++/60056 2 // { dg-do compile { target c++11 } } 3 // { dg-require-effective-target tls } 4 5 template<typename T> 6 class Foo { 7 public: Foo()8 Foo() { 9 ++c; 10 } 11 private: 12 thread_local static int c; 13 }; 14 15 template<typename T> thread_local int Foo<T>::c(0); 16 main()17int main(){ 18 Foo<int> o; 19 } 20