This is an archive of the discontinued LLVM Phabricator instance.

[flang] Rework handling of non-type-bound user-defined I/O
ClosedPublic

Authored by klausler on Apr 13 2023, 10:53 AM.

Details

Summary

A fairly recent introduction of runtime I/O APIs called OutputDerivedType()
and InputDerivedType() didn't cover NAMELIST I/O's need to access
non-type-bound generic interfaces for user-defined derived type I/O
when those generic interfaces are defined in some scope other than the
one that defines the derived type.

The patch adds a new data structure shared between lowering
and the runtime that can represent all of the cases that can
arise with non-type-bound defined I/O. It can represent
scopes in which non-type-bound defined I/O generic interfaces
are inaccessible, too, due to IMPORT statements.

The data structure is now an operand to OutputDerivedType() and
InputDerivedType() as well as a data member in the NamelistGroup
structure.

Diff Detail

Event Timeline

klausler created this revision.Apr 13 2023, 10:53 AM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Apr 13 2023, 10:53 AM
vdonaldson accepted this revision.Apr 13 2023, 1:27 PM
This revision is now accepted and ready to land.Apr 13 2023, 1:27 PM
This revision was landed with ongoing or failed builds.Apr 13 2023, 3:35 PM
This revision was automatically updated to reflect the committed changes.