Files
clang-p2996/flang/runtime/descriptor-io.cpp
Peter Klausler a6e77fdd74 [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.
2023-12-11 11:55:44 -08:00

6.3 KiB