arocc
arocc copied to clipboard
`Type.alingof` does not take target into account
This works running clang-14 -c --target=i386-linux-gnu test.c
typedef long long b;
_Static_assert(sizeof(b) == 8, "");
_Static_assert(_Alignof(b) == 4, "");
but arocc thinks the alignment is 8
It looks like the alignof function in Type.zig is returning the wrong value - it returns 8 for everything except msp430 (should be 4 for i386). From a quick glance at Zig's type.zig (which we aren't using) it looks like it would compute the wrong value there as well