On 06/07/2012 23:13, Tobias Burnus wrote: >> In case it's not, then everything is fine I guess, though I prefer >> avoiding polluting the scalarizer with assumed rank stuff ;-). > > It still will get worse, see above. Though, I wouldn't mind if you could > modify the scalarizer.
I don't see how I could. The scalarizer's purpose is translating array statements like foo(:,:) = bar(:,:), where the rank at least is supposed known, so that we know how many nested loops we have to generate. If the number of loops is known at runtime only, hem, I don't see what code we could generate. We could probably produce something with complex conditions and gotos in a single loop, but it seems to me far too convoluted, and too big a change, in an area that already doesn't lack complexity without it. On the other hand, if I look at what should be supported, it doesn't look that bad. There are only full array references, so gfc_conv_expr_descriptor with the flag se->descriptor_only should do the right thing (i.e. nothing). Class vs. type should be (correct me if I'm wrong) a matter of decorating/undecorating with a class container. As for the contiguous/non-contiguous matter, I propose using libgfortran's internal_{,un}pack and away with it. Now about the implementation, I guess the devil is in the details. I'll see if there is something that I obviously forgot or something to do in gfc_conv_expr_descriptor. Maybe that one (not the whole scalarizer) could use a fix. Mikael