https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87824
--- Comment #19 from Iain Buclaw <ibuclaw at gdcproject dot org> --- On another look, (In reply to Iain Buclaw from comment #15) > Still to do are: > > - runnable/cppa.d: (Remove struct __c_{u}long detection and tests) > - runnable/eh.d: (Have -fno-reorder-blocks-and-partitions default for D) > - runnable/nulltype.d (Set TYPE_TRANSPARENT_AGGR for D associative arrays) > > I'm still unsure about setting TYPE_TRANSPARENT_AGGR, it seems like its more > masking something else on x86. Though as I've said, associative arrays are > just a `struct{void*}` and treated as if it were a pointer anyway. On another look, the D language implementation is treating `typeof(null) function()` as being covariant with `int[int] function()`. The former is a function that returns `void*`, the latter returns `struct{void*}`. There is no difference on x86_64, but on others the difference is subtle. --- ret_typeof_null: mov eax, 0 ret ret_aa_null: mov eax, DWORD PTR 4[esp] mov DWORD PTR [eax], 0 ret 4 --- I'm going to send a change upstream that these types should not be covariant, rather than changing the ABI of associative arrays by setting TYPE_TRANSPARENT_AGGR.