https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71694
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- I guess even if not obviously used as a base we need to consider it being a base. Thus for void foo (B *b) { b->c = 1; } we may not access tail padding either. So stor-layout.c needs to be conservative in finish_bitfield_representative with including tail-padding which will pessimize code quite a bit unless the middle-end has a way to identify types that can not possibly have their tail-padding re-used by inheritance (or other means). I don't think we have a way to determine this at the moment.