This is an archive of the discontinued LLVM Phabricator instance.

[flang] Delay parse tree rewriting for I/O UNIT=func()
ClosedPublic

Authored by klausler on Oct 4 2022, 3:01 PM.

Details

Summary

When an I/O statement's UNIT= specifier is a variable that is a
function reference, parse tree rewriting may determine the wrong type
of the result because generic resolution has not yet been performed.
So move this bit of parse tree rewriting into I/O semantic
checking so that the right handling (integer -> external file unit
number, character pointer -> internal I/O) applies.

Diff Detail

Event Timeline

klausler created this revision.Oct 4 2022, 3:01 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Oct 4 2022, 3:01 PM
PeteSteinfeld accepted this revision.Oct 4 2022, 7:39 PM

All builds and tests correctly and looks good.

This revision is now accepted and ready to land.Oct 4 2022, 7:39 PM
This revision was automatically updated to reflect the committed changes.