Dear Paul, dear all, first, sorry for the belate review.
Paul Thomas wrote: > This is a slight development of the patch posted on the PR itself. > > class.c(finalize_component) is not able to deal correctly with > non-allocatable, derived type array components that have allocatable > components. Rather than generating loops in finalize_component, the > condition is detected in trans-stmt.c(gfc_trans_deallocate) and > gfc_deallocate_alloc_comp is called after obtaining the derived type > for the array and checking that it is not finalizable. > > Happily, this fix does not generate the error: > Error: Two or more part references with nonzero rank must not be > specified at (1) > which occurs if the code is written explicitly. > > Bootstraps and regtests on FC21/x86_64 > > OK for trunk and 4.9? OK. I think the patch should be okay - even if the code is not really beautiful. (Fault of our data representation not of the patch itself.) Cheers, Tobias