https://issues.dlang.org/show_bug.cgi?id=19148

--- Comment #3 from Yuxuan Shui <[email protected]> ---
I found the actual bug in codegen. In elfobj.c data_start(), when a symbol
doesn't have a explicit alignment (Salignment <= 0), the symbol itself is
aligned, but its section's alignment is not updated.

To reproduce:

__gshared real x;
pragma(msg, x.alignof);

Compiling it prints: 16LU, but the .data section of the resulting object file
is only aligned to 8 bytes.

--

Reply via email to