summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tls/opt-13.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tls/opt-13.c')
-rw-r--r--gcc/testsuite/gcc.dg/tls/opt-13.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tls/opt-13.c b/gcc/testsuite/gcc.dg/tls/opt-13.c
new file mode 100644
index 000000000..8eea76b68
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tls/opt-13.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target tls } */
+
+__thread struct
+{
+ int a;
+ char b[32];
+} thr;
+
+int
+main ()
+{
+ __builtin_strcpy (thr.b, "abcd");
+ return 0;
+}