https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416
--- Comment #15 from Martin Jambor <jamborm at gcc dot gnu.org> --- Created attachment 58724 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58724&action=edit simple (wip) fix I'm wondering whether just simply something like this would not be enough. I have looked at total scalarization and we will not replace a type found in the IL with another one there. Similarly, only propagation through assignments fiddles with existing types (when they are not aggregate) only when propagating from RHS to LHS and not the other way round. If we want to be more aggressive, we can add a flag when the new predicate fails but there is a good bitwise_type_for_mode and then when the flag is set, use that type instead in analyze_access_subtree. Note that so far I have only tested the attached patch with make -k check-gcc RUNTESTFLAGS="tree-ssa.exp=*sra*.c" make -k check-g++ RUNTESTFLAGS="dg.exp=*sra*.c" make -k check-gcc RUNTESTFLAGS="dg.exp=*sra*.c" I'll have a look at full test results tomorrow morning.