This is an archive of the discontinued LLVM Phabricator instance.

[flang][runtime] Support B/O/Z editing of CHARACTER
ClosedPublic

Authored by klausler on Apr 27 2022, 11:39 AM.

Details

Summary

This is a common extension, though semantics differ across
compilers. I've chosen to interpret the CHARACTER data
as if it were an arbitrary-precision integer value and
format or read it as such. This matches Intel's compilers
and nvfortran. (GNU Fortran can't handle lengths > 1 and XLF
seems to get the enddianness wrong.)

This patch generalizes the previous implementations of
B/O/Z input and output so that they'll work for arbitrary data
in memory, and then uses them for all B/O/Z input/output,
including (now) CHARACTER.

Diff Detail

Event Timeline

klausler created this revision.Apr 27 2022, 11:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2022, 11:39 AM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Apr 27 2022, 11:39 AM
klausler updated this revision to Diff 425591.Apr 27 2022, 12:46 PM

Reformatting.

vdonaldson accepted this revision.Apr 27 2022, 2:14 PM
This revision is now accepted and ready to land.Apr 27 2022, 2:14 PM
This revision was automatically updated to reflect the committed changes.