https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94383
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |ktkachov at gcc dot gnu.org, | |rearnsha at gcc dot gnu.org, | |rsandifo at gcc dot gnu.org --- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Seems it is in aapcs_vfp_sub_candidate, which for C++17 recurses on the DECL_FIELD_IS_BASE FIELD_DECL and because 16039 /* There must be no padding. */ 16040 if (maybe_ne (wi::to_poly_wide (TYPE_SIZE (type)), 16041 count * GET_MODE_BITSIZE (*modep))) 16042 return -1; check fails, as the type is base, with no elts (count == 0) but TYPE_SIZE of BITS_PER_UNIT, it returns -1 and thus returns it for the whole pair class too. The question is what exactly the AAPCS says. And if we want to ignore the empty base fields, the question is how to exactly recognize them in the backend, because DECL_FIELD_IS_BASE is a FE macro, and I doubt one can use it e.g. in LTO. So, shall aapcs_vfp_sub_candidate ignore DECL_ARTIFICIAL FIELD_DECLs that have DECL_SIZE (field) && integer_zerop (DECL_SIZE (field)) ? Something else? What do other compilers do here?