aboutsummaryrefslogtreecommitdiffstats
path: root/test/monniaux/thread_local/thread_local.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/monniaux/thread_local/thread_local.c')
-rw-r--r--test/monniaux/thread_local/thread_local.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/monniaux/thread_local/thread_local.c b/test/monniaux/thread_local/thread_local.c
new file mode 100644
index 00000000..7a50db0a
--- /dev/null
+++ b/test/monniaux/thread_local/thread_local.c
@@ -0,0 +1,13 @@
+#include <stdio.h>
+
+_Thread_local int toto;
+_Thread_local int toto2 = 45;
+
+int foobar(void) {
+ return toto;
+}
+
+int main() {
+ printf("%d %d\n", toto, toto2);
+ return 0;
+}