[all-commits] [llvm/llvm-project] a6e77f: [flang][runtime] Make defined formatted I/O proces...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Mon Dec 11 11:55:58 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a6e77fdd741ff8d2fb2e61b395c11c20ec03f172
https://github.com/llvm/llvm-project/commit/a6e77fdd741ff8d2fb2e61b395c11c20ec03f172
Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
Date: 2023-12-11 (Mon, 11 Dec 2023)
Changed paths:
M flang/runtime/descriptor-io.cpp
M flang/runtime/descriptor-io.h
Log Message:
-----------
[flang][runtime] Make defined formatted I/O process format elementally (#74150)
The present implementation of defined formatted I/O is incorrect for
arrays in the data item list; it assumes that a DT defined format
descriptor (or list-directed/namelist instance) applies to all of the
elements in the array. The loop over the elements in the array is within
the DefinedFormattedIo() template function that handles defined
formatted I/O, not around its calls. This causes only one format list
edit descriptor to be used for the whole array, which is of course
wrong.
Invert this arrangment by performing the per-element looping in at the
top level in FormattedDerivedTypeIo() instead.
Defined unformatted I/O remains as it was.
More information about the All-commits
mailing list