summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/sptls04/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/sptests/sptls04/init.c')
-rw-r--r--testsuites/sptests/sptls04/init.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/testsuites/sptests/sptls04/init.c b/testsuites/sptests/sptls04/init.c
index fad919f8ac..bbbe81b9d1 100644
--- a/testsuites/sptests/sptls04/init.c
+++ b/testsuites/sptests/sptls04/init.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2017 embedded brains GmbH & Co. KG
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -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__