summaryrefslogtreecommitdiff
path: root/test/alignment.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/alignment.pass.cpp')
-rw-r--r--test/alignment.pass.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/alignment.pass.cpp b/test/alignment.pass.cpp
index 5ab5584..1a3ca5a 100644
--- a/test/alignment.pass.cpp
+++ b/test/alignment.pass.cpp
@@ -13,8 +13,16 @@
#include <unwind.h>
-struct MaxAligned {} __attribute__((aligned));
-static_assert(alignof(_Unwind_Exception) == alignof(MaxAligned), "");
+// EHABI : 8-byte aligned
+// itanium: largest supported alignment for the system
+#if defined(_LIBUNWIND_ARM_EHABI)
+static_assert(alignof(_Unwind_Control_Block) == 8,
+ "_Unwind_Control_Block must be double-word aligned");
+#else
+struct MaxAligned {} __attribute__((__aligned__));
+static_assert(alignof(_Unwind_Exception) == alignof(MaxAligned),
+ "_Unwind_Exception must be maximally aligned");
+#endif
int main()
{