diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2020-05-28 18:26:22 +0200 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2020-05-28 18:26:22 +0200 |
commit | 050f408dd2b3f2cf1b8db512edafe2701b7a2dce (patch) | |
tree | 5f962fb6166fd2cd95a239e0d66fee362c1bfb23 /test/monniaux/thread_local/thread_local2.c | |
parent | d46e96ef6c0287d6892bfc7d2272b7473f5e4979 (diff) | |
parent | 17c564cb99076eb0e2b34eeed4f24a18febe7116 (diff) | |
download | compcert-kvx-050f408dd2b3f2cf1b8db512edafe2701b7a2dce.tar.gz compcert-kvx-050f408dd2b3f2cf1b8db512edafe2701b7a2dce.zip |
Merge branch 'kvx-work' into mppa-RTLpathSE
Adapting the new mppa-RTLpathSE passes into the new Compiler.vexpand
framework
Diffstat (limited to 'test/monniaux/thread_local/thread_local2.c')
-rw-r--r-- | test/monniaux/thread_local/thread_local2.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/monniaux/thread_local/thread_local2.c b/test/monniaux/thread_local/thread_local2.c new file mode 100644 index 00000000..ba244ac6 --- /dev/null +++ b/test/monniaux/thread_local/thread_local2.c @@ -0,0 +1,18 @@ +#include <stdio.h> +#include <pthread.h> + +_Thread_local int toto; +_Thread_local int toto2 = 45; + +void* poulet(void * dummy) { + printf("%p %p\n", &toto, &toto2); + return NULL; +} + +int main() { + pthread_t thr; + poulet(NULL); + pthread_create(&thr, NULL, poulet, NULL); + pthread_join(thr, NULL); + return 0; +} |