On 01/08/2012 12:00, Tobias Burnus wrote: > On 07/27/2012 07:26 PM, Mikael Morin wrote: >> do you have a test case exhibiting the problem? It seems fine to me. > > Your second test case was too convoluted for me - and as I wasn't at > home, I couldn't test it. I now believe that your patch is okay; I will > later formally review it. I will formally ask for it. ;-) > > Do you intent to wrap it for final inclusion? I think it only lacks a > dejaGNUified test case and a changelog. Will do. > > * * * > > However, I found another spot where one needs to have a scalarizer; > possibly a poor man's version is enough. Namely INTENT(OUT) handling. Indeed. > Do you have an idea how to best handle that case? It seems some new code is necessary. I don't know how well it will fit/reuse the existing though.
I have been thinking about rewriting the scalarizer in a way that would need less bookkeeping to make things work. Nothing near a patch though, and it's not something for 4.8. Anyway, here is the interface I had in mind: gfc_init_loopinfo (loopinfo); /* generate the code. */ gfc_conv_expr (loopinfo, expr1); gfc_conv_expr (loopinfo, expr2); /* etc, do something, putting loopinfo every time as parameter so that it is populated appropriately... and then: */ loopblock = gfc_scalarize (loopinfo); the gfc_scalarize could have a big `if' in it distinguishing known rank from assumed rank. Maybe we could take the opportunity to make a seed for a new scalarizer. Mikael