Allow all tests to pass with `EIGEN_TEST_NO_EXPLICIT_VECTORIZATION`
diff --git a/test/dynalloc.cpp b/test/dynalloc.cpp
index 23c90a7..cdc10ee 100644
--- a/test/dynalloc.cpp
+++ b/test/dynalloc.cpp
@@ -20,9 +20,12 @@
void check_handmade_aligned_malloc()
{
+ // Hand-make alignment needs at least sizeof(void*) to store the offset.
+ constexpr int alignment = (std::max<int>)(EIGEN_DEFAULT_ALIGN_BYTES, sizeof(void*));
+
for(int i = 1; i < 1000; i++)
{
- char *p = (char*)internal::handmade_aligned_malloc(i);
+ char *p = (char*)internal::handmade_aligned_malloc(i, alignment);
VERIFY(internal::UIntPtr(p)%ALIGNMENT==0);
// if the buffer is wrongly allocated this will give a bad write --> check with valgrind
for(int j = 0; j < i; j++) p[j]=0;