From 959a0f199841473b032f8c8986ba77413cc48e85 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Sat, 30 Mar 2019 17:45:09 +0000 Subject: [PATCH] Make alignTest pass on ARM. This test assumed that a vector of 4 ints needed 16-byte alignment, but this is target specific. Now check that the runtime provides at least as strong alignment as the compiler expects. --- Test/alignTest.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Test/alignTest.m b/Test/alignTest.m index aa636e1..7314eb3 100644 --- a/Test/alignTest.m +++ b/Test/alignTest.m @@ -48,7 +48,7 @@ typedef int v4si __attribute__ ((vector_size (16))); { size_t addr = (size_t)&var; fprintf(stderr, "self: %p Addr: %p\n", self, &var); - assert(addr % 16 == 0); + assert(addr % __alignof__(v4si) == 0); } @end