On Wed, 2020-04-22 at 11:50 +0200, Jakub Jelinek via Gcc-patches wrote:
> Hi!
>
> On Tue, Apr 21, 2020 at 03:58:52PM +0100, Richard Sandiford wrote:
> > > if (TREE_CODE (field) != FIELD_DECL)
> > > continue;
> > >
> > > - sub_count = aapcs_vfp_sub_candidate (TREE_TYPE (field), modep);
> > > + /* Ignore C++17 empty base fields, while their type indicates
> > > + they do contain padding, they have zero size and thus don't
> > > + contain any padding. */
> > > + if (DECL_ARTIFICIAL (field)
> > > + && DECL_NAME (field) == NULL_TREE
> > > + && RECORD_OR_UNION_TYPE_P (TREE_TYPE (field))
> > > + && DECL_SIZE (field)
> > > + && integer_zerop (DECL_SIZE (field))
> > > + && (*avoid_c17empty_field & AVOID))
> > > + {
>
> As multiple targets are affected apparently, I believe at least
> aarch64, arm, powerpc64le, s390{,x} and ia64,
> I think we should have a middle-end predicate for this, so that if we need
> to tweak it, we can do it in one spot.
>
> So is the following ok (of course after testing)?
>
> 2020-04-22 Jakub Jelinek <ja...@redhat.com>
>
> PR target/94383
> * calls.h (cxx17_empty_base_field_p): Declare.
> * calls.c (cxx17_empty_base_field_p): Define.
OK.
jeff
>