Hi Thomas, based on your comments I'll withdraw the patch, but read on...
On 03/20/19 17:14, Thomas Koenig wrote: > Hi Harald, > >> My reading of the standard suggests that this is not allowed: >> >> SOURCE shall be a scalar or array of any type. >> >> MOLD shall be a scalar or array of any type. ... > > I read the stanard differently. For comparison, look at UNPACK: > > # VECTOR shall be a rank-one array of any type. > > and a function result is fine there. If PROCEDURE is a type, then my patch is wrong. I got rejections of several variations of the test cases by Crayftn and Intel, which seemed to support my interpretation. > Also, looking at how the paragraph about MOLD continues: > > # MOLD shall be a scalar or array of any type. If it is a variable, it > # need not be defined. > > The sentence starting with "If" would be redundant if MOLD could > only be a variable. No. A constant expression for MOLD is quite useful; I use it every day. In fact, I consider TRANSFER to be the "Swiss army knife of Fortran 95", and we have tons on TRANSFER in our code, with MOLD being 1, [1], ["*"], you name it... > However, I am ready to be convinced otherwise :-) Well, your response shows that the review process exists! I have a slightly different approach in mind that I need to check. Thanks for the review anyway, Harald (not the "real" McGyver) > Regards > > Thomas >