Debian Codegraph @

gcc/testsuite/g++.dg/tls/thread_local-ice4.C

raw
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:
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
17 int main(){
18 Foo<int> o;
19 }