https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89458
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2019-02-26 CC| |jason at gcc dot gnu.org Component|other |c++ Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The issue is that sizeof(Obj) is 256. But yes, the padding at the end of the object need not be copied. Thus this is a missed optimization (I'm not sure we actually store the "original" size anywhere though). Maybe the FE could use the classtype-as-base type here?