On Fri, Mar 25, 2022 at 02:26:56PM +0000, Richard Earnshaw wrote:
> Just to confirm that this is our final position.  The 'int:0 field should be
> ignored for the purposes of determining the parameter passing as it has no
> effect on the layout of the type.
> 
> We do not feel that an update to the AAPCS or AAPCS64 is needed as the
> wording already covers this.

Ok.  So on the GCC side you need for both arm and aarch64 something similar
to the r12-6418-g3159da6c46568a7c change (of course on the ARM/AArch64 side
it will be in different spots etc.).
But generally, if you see during TYPE_FIELDS walk for argument/return value
passing decisions (both test whether something could be passed in registers
or say alignment decisions for those) rather than layout
  DECL_BIT_FIELD (field) && integer_zerop (DECL_SIZE (field))
ignore it - if DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD (field) then always,
otherwise arrange for 2 invocations in which one ignores them and one
doesn't and warns if the overall decisions change.

        Jakub

Reply via email to