summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-12-21 12:31:32 (UTC)
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-12-21 12:32:12 (UTC)
commit8b59916a763321a927b1c9103728cac03af82d36 (patch)
treee6a5c13ae305ccec154e5b8281f9671ef7dfbfa1
parentc37807e97ca8371e90be41b24c8801800c591cc3 (diff)
downloadrtems-8b59916a763321a927b1c9103728cac03af82d36.tar.bz2
spcxx01: Add test case
-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 9867316..7962810 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);
}