[flang][runtime] Support non contiguous array in Finalize/Initialize (#67295)
Finalize/Initialize may be called on non contiguous arrays when dealing with INTENT(OUT) dummies or non contiguous LHS. Update the related element access to use indices instead of assuming contiguity and manually computing the byte offset. Also, the descriptor passed to parent type final routines should be set to the parent type, otherwise descriptor.IsContiguous() may wrongfully return true when finalizing parent components. Create a pointer to the parent component when recursing in Finalize.
Loading
Please sign in to comment