"Version D 2.007: Data items in static data segment >= 16 bytes in size are now paragraph aligned."
Yet this test shows that neither double[4] nor creal are aligned.
import core.stdc.stdio: printf;
int a;
double[4] d;
creal cr;
void main() {
printf("%X:%u %X:%u %X:%u\n", &a, (cast(size_t)&a) % 8, &d, (cast(size_t)&d) % 8, &cr, (cast(size_t)&cr) % 8);
}
Comment #1 by yebblies — 2011-07-03T09:51:34Z
Actually, those variables are in tls. Variables in the static data segment do seem to be 16 byte aligned.
They appear to be all offset from 16 byte alignment by 4 bytes.
Leaving open as this is probably not intended.
Comment #2 by bugzilla — 2012-01-20T13:53:24Z
TLS segments are now all 16 byte aligned. However, individual variables are aligned based on their type. For example, arrays are aligned based on the alignment requirement of their element type. Arrays of double are aligned on 8 byte boundaries, not 16 bytes.