summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-30 16:22:02 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-05-02 18:41:26 +0200
commit2df95414a7b7b38e5146e13b11d8a903bcc84342 (patch)
treebcff1b3aabdb8331c631320f113c1f3d9f179cc6 /testsuites
parente10dec0fe72c19320d2c93b905457a5327ec1235 (diff)
downloadrtems-2df95414a7b7b38e5146e13b11d8a903bcc84342.tar.bz2
spmisc01: Test RTEMS_NOINIT
Close #3866.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/spmisc01/init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuites/sptests/spmisc01/init.c b/testsuites/sptests/spmisc01/init.c
index e64fa4e480..6fbc0eeff8 100644
--- a/testsuites/sptests/spmisc01/init.c
+++ b/testsuites/sptests/spmisc01/init.c
@@ -49,6 +49,8 @@ RTEMS_CONST static int const_func(void)
RTEMS_SECTION(".rtemsroset.test") static int section_variable = 28;
+RTEMS_NOINIT static int noinit_variable;
+
RTEMS_USED static int used_func(void)
{
return 35;
@@ -205,6 +207,7 @@ static int concat(void)
static void Init(rtems_task_argument arg)
{
void *p;
+ int v;
TEST_BEGIN();
rtems_test_assert(inline_func() == 7);
@@ -213,6 +216,8 @@ static void Init(rtems_task_argument arg)
rtems_test_assert(pure_func() == 21);
rtems_test_assert(const_func() == 23);
rtems_test_assert(section_variable == 28);
+ v = noinit_variable;
+ RTEMS_OBFUSCATE_VARIABLE(v);
rtems_test_assert(unused_arg_and_variable_func(49) == 42);
rtems_test_assert(sizeof(packed_struct) == 5);
rtems_test_assert(alias_func() == 14);