aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/obj-c++.dg/tls/init-2.mm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/obj-c++.dg/tls/init-2.mm')
-rw-r--r--gcc-4.9/gcc/testsuite/obj-c++.dg/tls/init-2.mm14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/obj-c++.dg/tls/init-2.mm b/gcc-4.9/gcc/testsuite/obj-c++.dg/tls/init-2.mm
new file mode 100644
index 000000000..327c309e9
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/obj-c++.dg/tls/init-2.mm
@@ -0,0 +1,14 @@
+/* Invalid initializations. */
+/* { dg-require-effective-target tls } */
+
+extern __thread int i;
+__thread int *p = &i; /* { dg-error "dynamic initialization" } */
+
+extern int f();
+__thread int j = f(); /* { dg-error "dynamic initialization" } */
+
+struct S
+{
+ S();
+};
+__thread S s; /* { dg-error "dynamic initialization" } */