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-Tag: releases/gcc-5.1.0~1655 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39dac19e286a8b23b0e3bdde6ba18b65f3f919f8;p=thirdparty%2Fgcc.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 0edc9bbf1d96..dc3b60788606 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 000000000000..c49477bd7a98 --- /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; +}