diff --git a/tests/Makefile b/tests/Makefile index 31421c63ce33d088b08effd36d4dbf33e06d91f4..3530a5ca32d7d8615f51b28ef808e3dadecc46b7 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -71,6 +71,7 @@ EXPECT_NAMES=\ time/mktime \ time/strftime \ time/time \ + tls \ unistd/access \ unistd/brk \ unistd/dup \ diff --git a/tests/expected/tls.stderr b/tests/expected/tls.stderr new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tests/expected/tls.stdout b/tests/expected/tls.stdout new file mode 100644 index 0000000000000000000000000000000000000000..d0b7b3c2e6fd84b64c2cf46c150430730bc7727a --- /dev/null +++ b/tests/expected/tls.stdout @@ -0,0 +1,2 @@ +0 == 0 +1 == 1 diff --git a/tests/tls.c b/tests/tls.c new file mode 100644 index 0000000000000000000000000000000000000000..0257427e5c2e89775bb6532f3ec2baeb1d754841 --- /dev/null +++ b/tests/tls.c @@ -0,0 +1,10 @@ +#include <stdio.h> + +_Thread_local int tbss = 0; +_Thread_local int tdata = 1; + +int main(int argc, char ** argv) { + printf("%d == 0\n", tbss); + printf("%d == 1\n", tdata); + return 0; +}