http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31067
--- Comment #43 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-07-28 13:51:32 UTC --- Created attachment 24856 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24856 gcc47-pr31067.patch Patch to optimize a = minloc (b) for rank 1 b into a = minloc (b, dim = 1), according to the standard the latter function is supposed to return the first element of the array returned by former function (which should return a rank 1, 1 element array). So, by instead initializing the (one element) array with the scalar we can get it actually inlined. Doing this during genericization looked much harder to me.