diff options
Diffstat (limited to 'testsuites/sptests/sptls04/init.c')
-rw-r--r-- | testsuites/sptests/sptls04/init.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/testsuites/sptests/sptls04/init.c b/testsuites/sptests/sptls04/init.c index fad919f8ac..79ab5a5a9a 100644 --- a/testsuites/sptests/sptls04/init.c +++ b/testsuites/sptests/sptls04/init.c @@ -9,7 +9,7 @@ /* * This test program runs also on GNU/Linux and FreeBSD. Use * - * cc init.c && ./a.out + * cc init.c tls.c && ./a.out * * to run it. */ @@ -18,6 +18,8 @@ #include "config.h" #endif +#include "sptls04.h" + #ifdef __rtems__ #include <tmacros.h> @@ -30,9 +32,9 @@ #endif /* __rtems__ */ -static __thread int i; +static _Thread_local int i; -static __thread int j; +static _Thread_local int j; static __attribute__((__constructor__)) void con(void) { @@ -43,6 +45,7 @@ static void test(void) { rtems_test_assert(i == 1); rtems_test_assert(j == 0); + rtems_test_assert(k == 2); } #ifdef __rtems__ |