https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92486
--- Comment #10 from rguenther at suse dot de <rguenther at suse dot de> --- On Thu, 14 Nov 2019, pinskia at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92486 > > --- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > I have another idea, cant we add fake field decls while doing structure > layout? > Then sra total scalarization will just work. And there is no other magic in > the > compiler needed? I suppose code-gen would suck for the 3-byte padding field between a char and an int. But total scalarization works with the premise that we don't see any direct accesses to source or destination so I think we should simply change "total scalarization" to be "emit the block-copy on GIMPLE". Preferably without "crossing" field boundaries but covering padding by choosing larger accesses.