Dear Mikael, The patch is OK for trunk.
A small niggle: Although present in the original testcase, 'a' is unused. I am not in a position to find out for myself, right now, but does the testcase of comment #10 work with this patch? Thanks for the patch Paul On 1 February 2016 at 23:07, Mikael Morin <mikael.mo...@sfr.fr> wrote: > Hello, > > this is about the case > > c(:) = elemental_func(c(1), ...) > > where as a result of a trunk change, only a reference to c(1) is saved to a > temporary variable, instead of its value. > > The fix tries to save the amount of copying as much as possible by detecting > the above case. Technically through the usage of a new field > needs_temporary. > > The patch is a variant of the one that has been on bugzilla for months. > The main difference is the usage of gfc_expr_is_variable instead of the > check for expr_type == EXPR_VARIABLE (the former includes pointer-returning > functions as well). > > Regression-tested on x86_64-unknown-linux-gnu. OK for trunk? > Mikael > -- The difference between genius and stupidity is; genius has its limits. Albert Einstein