https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71694
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> --- (In reply to Richard Biener from comment #3) > The C++ FE identifies such types with > > CLASSTYPE_NON_LAYOUT_POD_P (t) || CLASSTYPE_EMPTY_P (t) > > where only CLASSTYPE_NON_LAYOUT_POD_P is interesting to us. Only available > in struct lang_type. Possibly able to expose that via a new langhook. Perhaps a langhook that returns the size that is safe to access when we don't know that we're dealing with a complete object of that type, i.e. CLASSTYPE_SIZE for C++ classes.