aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-x86-64/tlsdesc1a.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite/ld-x86-64/tlsdesc1a.c')
-rw-r--r--ld/testsuite/ld-x86-64/tlsdesc1a.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/tlsdesc1a.c b/ld/testsuite/ld-x86-64/tlsdesc1a.c
new file mode 100644
index 0000000..7d2f4f6
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/tlsdesc1a.c
@@ -0,0 +1,19 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+extern int foo (void);
+
+extern __thread int yyy;
+
+__thread int zzz = 20;
+
+int
+main (void)
+{
+ if (foo () != zzz)
+ abort ();
+ if (yyy != 100)
+ abort ();
+ printf ("PASS\n");
+ return 0;
+}