summaryrefslogtreecommitdiff
path: root/test/elf/Inputs/tls.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/elf/Inputs/tls.c')
-rw-r--r--test/elf/Inputs/tls.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/elf/Inputs/tls.c b/test/elf/Inputs/tls.c
new file mode 100644
index 0000000000000..6723507565626
--- /dev/null
+++ b/test/elf/Inputs/tls.c
@@ -0,0 +1,11 @@
+extern __thread int tls0;
+extern __thread int tls1;
+extern __thread int tls2;
+
+__thread int tls0 = 0;
+__thread int tls1 = 0;
+__thread int tls2 = 1;
+
+int main() {
+ return tls0 + tls1 + tls2;
+}