[dmd-internals] Testcase in test42.d
Walter Bright
walter at digitalmars.com
Fri Apr 5 12:16:03 PDT 2013
On 4/5/2013 10:15 AM, David Nadlinger wrote:
>
>> People use such constructs to support SIMD code, which requires 16 byte
>> alignment.
>
> I think you might be wrong here:
>
> »struct A { int[4] a; }« is equivalent to »struct A { int a0, a1, a2, a3; }«
> by your own definition, and GCC/Clang emit a global of this type aligned to 4
> bytes. Thus, generally requiring 16 byte alignment would break C ABI
> compatibility.
>
> For this reasons, I disabled the test for LDC as well. If you think that it
> should pass, where does the 16 byte figure come from (in terms of both lang
> spec and DMD frontend)? At least back when I had a look at the test case for
> LDC, I couldn't really find a justification.
>
I am reluctant to change that, because it would break existing code.
More information about the dmd-internals
mailing list