This is an archive of the discontinued LLVM Phabricator instance.

[flang][runtime] Recognize and handle FINAL subroutines with contiguous dummy arrays when data are not so
ClosedPublic

Authored by klausler on Jul 31 2023, 4:16 PM.

Details

Summary

When a FINAL subroutine is being invoked for a discontiguous array, which can
happen for INTENT(OUT) dummy arguments and for some left-hand side variables
in intrinsic assignment statements, it may be the case that the subroutine
being called was defined with a dummy argument that requires contiguous data.

Extend the derived type descriptions used by the runtime to signify when
a special procedure binding requires contiguity; set the flags accordingly;
check them in the runtime support library, and, when necessary, use a
temporary shallow copy of the finalized array data in the call to the
final subroutine.

Diff Detail

Event Timeline

klausler created this revision.Jul 31 2023, 4:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 31 2023, 4:16 PM
klausler requested review of this revision.Jul 31 2023, 4:16 PM
vzakhari accepted this revision.Jul 31 2023, 4:34 PM

Thank you!

This revision is now accepted and ready to land.Jul 31 2023, 4:34 PM
klausler updated this revision to Diff 546112.Aug 1 2023, 10:02 AM

clang-format

klausler updated this revision to Diff 546169.Aug 1 2023, 11:48 AM

Try reformatting with the latest clang-format, maybe that's what the CI check is using. Grr.

This revision was landed with ongoing or failed builds.Aug 1 2023, 1:47 PM
This revision was automatically updated to reflect the committed changes.