This is an archive of the discontinued LLVM Phabricator instance.

[flang] Implement runtime Assign()
ClosedPublic

Authored by klausler on Aug 6 2021, 5:26 PM.

Details

Summary

Define an API for, and implement, runtime support for arbitrary
assignment of one descriptor's data to another, with full support for
(re)allocation of allocatables with finalization when necessary,
user-defined derived type assignment TBP calls, and intrinsic (default)
componentwise assignment of derived type instances with allocation of
automatic components. Also clean up API and implementation of
finalization/destruction using knowledge gained while studying
edge cases for assignment in the 2018 standard.

The look-up procedure for special procedure bindings in derived
types has been optimized from O(N) to O(1) since it will probably
matter more. This required some analysis in runtime derived type
description table construction in semantics and some changes to the
table schemata.

Executable Fortran tests have been developed; they'll be added
to the test base once they can be lowered and run by f18.

Diff Detail

Event Timeline

klausler created this revision.Aug 6 2021, 5:26 PM
klausler requested review of this revision.Aug 6 2021, 5:26 PM
jeanPerier accepted this revision.Aug 9 2021, 1:06 AM

Looks great, thanks !

This revision is now accepted and ready to land.Aug 9 2021, 1:06 AM
This revision was landed with ongoing or failed builds.Aug 9 2021, 9:32 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2021, 9:32 AM