summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuites/sptests/spcxx01/init.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuites/sptests/spcxx01/init.cc b/testsuites/sptests/spcxx01/init.cc
index 986731634b..7962810da0 100644
--- a/testsuites/sptests/spcxx01/init.cc
+++ b/testsuites/sptests/spcxx01/init.cc
@@ -37,6 +37,10 @@
const char rtems_test_name[] = "SPCXX 1";
+struct alignas(256) S {
+ int i;
+};
+
extern "C" void Init(rtems_task_argument arg)
{
TEST_BEGIN();
@@ -49,6 +53,12 @@ extern "C" void Init(rtems_task_argument arg)
rtems_test_assert(reinterpret_cast<uintptr_t>(i) % 256 == 0);
::delete(i);
+ S *s = new S;
+ RTEMS_OBFUSCATE_VARIABLE(s);
+ rtems_test_assert(s != nullptr);
+ rtems_test_assert(reinterpret_cast<uintptr_t>(s) % 256 == 0);
+ delete s;
+
TEST_END();
exit(0);
}