https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92738
--- Comment #12 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- (In reply to Wilco from comment #11) > Would using -frepack-arrays solve this issue? I proposed making that the > default a while back. It would do any repacking that is necessary at call > sites rather than creating multiple copies of all loops in every function. I'm not convinced that that is the answer - this would penalize (at runtime) programs which use non-contiguous memory when _not_ passing them to an explicit size or assumed size paramter. For example, all the optimizations for passing a transposed argument would then no longer work. What we could do instead is to introduce another option, -frepack-inline (or whatever we want to call it) and enable this by default at all -O except at -Os. People who have problems can then enable that option for the specific files they have the problems with.