diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0edc9bbf1d9..dc3b6078860 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,9 +1,14 @@ +2015-01-16 Paolo Carlini + + PR c++/60056 + * g++.dg/tls/thread_local-ice4.C: New. + 2015-01-16 James Greenhalgh * g++.dg/abi/mangle-abi-crypto.C: Add crypto options, rather than Neon options. -2014-01-16 Paolo Carlini +2015-01-16 Paolo Carlini PR c++/62276 * g++.dg/cpp0x/vt-62276.C: New. diff --git a/gcc/testsuite/g++.dg/tls/thread_local-ice4.C b/gcc/testsuite/g++.dg/tls/thread_local-ice4.C new file mode 100644 index 00000000000..c49477bd7a9 --- /dev/null +++ b/gcc/testsuite/g++.dg/tls/thread_local-ice4.C @@ -0,0 +1,19 @@ +// PR c++/60056 +// { dg-do compile { target c++11 } } +// { dg-require-effective-target tls } + +template +class Foo { +public: + Foo() { + ++c; + } +private: + thread_local static int c; +}; + +template thread_local int Foo::c(0); + +int main(){ + Foo o; +}