https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90608
--- Comment #4 from ktkachov at gcc dot gnu.org --- LTO'ing libgfortran aside, how much work would it be to teach the scalarizer to at least elide the temporary arrays in expressions like: A(:) = minloc(...) ? I think that would be a good start towards improving such code.