https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70603
--- Comment #3 from Marios Hadjieleftheriou <mhadji at gmail dot com> ---
I am trying to use posix_memalign and a double pointer to double, and that is
also failing. Is this an overalignment issue as well?
#include <iostream>
#include <cstddef>
struct B {
B() {
x = new double*[1];
void* p = x[0];
posix_memalign(&p, 32, 1);
}
double** x;
};
struct A
{
A() { b1 = new B(); b2 = new B(); }
B* b1;
B* b2;
};
int main(int argc, char** argv) {
A a;
int ret = reinterpret_cast<intptr_t>(a.b1->x) % 32 +
reinterpret_cast<intptr_t>(a.b2->x) % 32;
return ret;
}