This is an archive of the discontinued LLVM Phabricator instance.

[flang] Implement user-defined derived type runtime I/O
ClosedPublic

Authored by klausler on Jun 25 2021, 10:41 AM.

Details

Summary

With derived type description tables now available to the
runtime library, it is possible to implement the concept
of "child" I/O statements in the runtime and use them to
convert instances of derived type I/O data transfers into
calls to user-defined subroutines when they have been specified
for a type. (See Fortran 2018, subclauses 12.6.4.8 & 13.7.6).

  • Support formatted, list-directed, and NAMELIST transfers to internal parent units; support these, and unformatted transfers, for external parent units.
  • Support nested child defined derived type I/O.
  • Parse DT'foo'(v-list) FORMAT data edit descriptors and passes their strings &/or v-list values as arguments to the defined formatted I/O routines.
  • Fix problems with this feature encountered in semantics and FORMAT valiation during development and end-to-end testing.
  • Convert typeInfo::SpecialBinding from a struct to a class after adding a member function.

Diff Detail

Event Timeline

klausler created this revision.Jun 25 2021, 10:41 AM
klausler requested review of this revision.Jun 25 2021, 10:41 AM
klausler updated this revision to Diff 354568.Jun 25 2021, 11:57 AM

Rebased to current llvm-project/main.

jeanPerier accepted this revision.Jun 28 2021, 1:34 AM

Code looks great to me !

flang/runtime/io-stmt.cpp
30

These 3 pre-merge checks warning also look applicable in f18 coding style context.

This revision is now accepted and ready to land.Jun 28 2021, 1:34 AM
This revision was landed with ongoing or failed builds.Jun 28 2021, 11:36 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2021, 11:36 AM