From: Paolo Carlini Date: Fri, 16 Jan 2015 17:47:43 +0000 (+0000) Subject: re PR c++/60056 ([C++11] ICE in var_defined_without_dynamic_init, at cp/decl2.c:2876... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=39dac19e286a8b23b0e3bdde6ba18b65f3f919f8;p=gcc.git re PR c++/60056 ([C++11] ICE in var_defined_without_dynamic_init, at cp/decl2.c:2876 with TLS static) 2015-01-16 Paolo Carlini PR c++/60056 * g++.dg/tls/thread_local-ice4.C: New. From-SVN: r219760 --- 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; +}