From 8b59916a763321a927b1c9103728cac03af82d36 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Fri, 21 Dec 2018 13:31:32 +0100 Subject: spcxx01: Add test case --- testsuites/sptests/spcxx01/init.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) 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(i) % 256 == 0); ::delete(i); + S *s = new S; + RTEMS_OBFUSCATE_VARIABLE(s); + rtems_test_assert(s != nullptr); + rtems_test_assert(reinterpret_cast(s) % 256 == 0); + delete s; + TEST_END(); exit(0); } -- cgit v1.2.3