|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
ae1d5f4d |
| 22-Jul-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Reset unit frame buffer when re-opening
An OPEN statement that implies closing a connection must invalidate the unit's frame buffer so as to prevent stale data from the old connecti
[flang][runtime] Reset unit frame buffer when re-opening
An OPEN statement that implies closing a connection must invalidate the unit's frame buffer so as to prevent stale data from the old connection from being read into the newly-connected unit.
Differential Revision: https://reviews.llvm.org/D130430
show more ...
|
| #
1a65d09d |
| 07-Jul-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Keep frame buffer in sync with file when truncating
When the I/O runtime is truncating an external file due to an implied ENDFILE or explicit ENDFILE, ensure that the unit's frame b
[flang][runtime] Keep frame buffer in sync with file when truncating
When the I/O runtime is truncating an external file due to an implied ENDFILE or explicit ENDFILE, ensure that the unit's frame buffer for the file discards any data that have become obsolete.
This bug caused trouble with ACCESS='STREAM' I/O using POS= on a WRITE, but it may have not been limited to that scenario.
Differential Revision: https://reviews.llvm.org/D129673
show more ...
|
| #
0508fd59 |
| 29-Jun-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Make ENDFILE work after non-advancing READ
An ENDFILE statement executed when a non-advancing READ has left the unit in the middle of a record must truncate the file at that positio
[flang][runtime] Make ENDFILE work after non-advancing READ
An ENDFILE statement executed when a non-advancing READ has left the unit in the middle of a record must truncate the file at that position.
Differential Revision: https://reviews.llvm.org/D129019
show more ...
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
d771245a |
| 17-Jun-2022 |
Peter Klausler <[email protected]> |
[flang] Fix READ/WRITE with POS= on stream units, with refactoring
First, ExternalFileUnit::SetPosition was being used both as a utility within the class' member functions as well as an API from I/O
[flang] Fix READ/WRITE with POS= on stream units, with refactoring
First, ExternalFileUnit::SetPosition was being used both as a utility within the class' member functions as well as an API from I/O statement processing. Make it private, and add APIs for SetStreamPos and SetDirectRec.
Second, ensure that SetStreamPos for POS= positioning in a stream doesn't leave the current record number and endfile record number in an arbitrary state. In stream I/O they are used only to manage end-of-file detection, and shouldn't produce false positive results from IsAtEnd() after repositioning.
Differential Revision: https://reviews.llvm.org/D128388
show more ...
|
| #
17853928 |
| 15-Jun-2022 |
Peter Klausler <[email protected]> |
[flang] Correct implementation of WAIT with no ID
Previous one was returning a bogus error status about a bad WAIT statement ID number.
Differential Revision: https://reviews.llvm.org/D127979
|
| #
cfbde714 |
| 11-Jun-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Catch more (all?) negative unit number errors
Fortran does have negative unit numbers -- they show up in child I/O subroutines for defined I/O and for OPEN(NEWUNIT=) -- but the runt
[flang][runtime] Catch more (all?) negative unit number errors
Fortran does have negative unit numbers -- they show up in child I/O subroutines for defined I/O and for OPEN(NEWUNIT=) -- but the runtime needs to catch the cases where a negative unit number that wasn't generated by the runtime is passed in for OPEN or for an I/O statement that would ordinarily create an anonymous "fort.NNN" file for a hitherto unseen unit.
Differential Revision: https://reviews.llvm.org/D127788
show more ...
|
|
Revision tags: llvmorg-14.0.5 |
|
| #
6963fb7d |
| 09-Jun-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Fix REWIND after non-advancing data transfer
A REWIND of a unit that's in the middle of a record due to a READ or WRITE statement with ADVANCE='NO' needs to reset the left tab limit
[flang][runtime] Fix REWIND after non-advancing data transfer
A REWIND of a unit that's in the middle of a record due to a READ or WRITE statement with ADVANCE='NO' needs to reset the left tab limit so that the next transfer takes place at the beginning of the first record.
Differential Revision: https://reviews.llvm.org/D127783
show more ...
|
| #
142db43b |
| 09-Jun-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Allow recovery from BACKSPACE(badUnit)
When an unconnected unit number is used in a BACKSPACE statement with ERR=, IOSTAT=, &/or IOMSG= control specifiers, don't crash, but let the
[flang][runtime] Allow recovery from BACKSPACE(badUnit)
When an unconnected unit number is used in a BACKSPACE statement with ERR=, IOSTAT=, &/or IOMSG= control specifiers, don't crash, but let the program deal with the error.
Differential Revision: https://reviews.llvm.org/D127782
show more ...
|
| #
6ce0fba0 |
| 08-Jun-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Skip remainder of bad input record even with ADVANCE='NO'
After a recoverable error condition in a READ statement with ADVANCE='NO', skip the remainder of the current record.
Diffe
[flang][runtime] Skip remainder of bad input record even with ADVANCE='NO'
After a recoverable error condition in a READ statement with ADVANCE='NO', skip the remainder of the current record.
Differential Revision: https://reviews.llvm.org/D127433
show more ...
|
| #
166d6ed5 |
| 06-Jun-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Better (but still synchronous) support for asynchronous I/O
Track pending "asynchronous" I/O operation IDs so that WAIT statements can report errors about bad ID numbers.
Lowering
[flang][runtime] Better (but still synchronous) support for asynchronous I/O
Track pending "asynchronous" I/O operation IDs so that WAIT statements can report errors about bad ID numbers.
Lowering will need to extended to call GetAsynchronousId() for a READ or WRITE statement with ID=n.
Differential Revision: https://reviews.llvm.org/D127421
show more ...
|
| #
03c066ab |
| 03-Jun-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Catch OPEN of connected file
Diagnose OPEN(FILE=f) when f is already connected by the same name to a distinct external I/O unit.
Differential Revision: https://reviews.llvm.org/D12
[flang][runtime] Catch OPEN of connected file
Diagnose OPEN(FILE=f) when f is already connected by the same name to a distinct external I/O unit.
Differential Revision: https://reviews.llvm.org/D127035
show more ...
|
| #
9a163ffe |
| 01-Jun-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Fix WRITE after OPEN(.., ACCESS="APPEND")
The initial size of the file was not being captured as the file position on which the first output buffer should be framed.
Differential R
[flang][runtime] Fix WRITE after OPEN(.., ACCESS="APPEND")
The initial size of the file was not being captured as the file position on which the first output buffer should be framed.
Differential Revision: https://reviews.llvm.org/D127029
show more ...
|
|
Revision tags: llvmorg-14.0.4 |
|
| #
8527f9e4 |
| 18-May-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Handle BACKSPACE after reading past EOF
An external READ(END=) that hits the end of the file must also note the virtual position of the endfile record that has just been discovered,
[flang][runtime] Handle BACKSPACE after reading past EOF
An external READ(END=) that hits the end of the file must also note the virtual position of the endfile record that has just been discovered, so that a later BACKSPACE statement won't end up at the wrong record.
Differential Revision: https://reviews.llvm.org/D126146
show more ...
|
|
Revision tags: llvmorg-14.0.3 |
|
| #
72831a59 |
| 28-Apr-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] BACKSPACE after non-advancing I/O
A BACKSPACE statement on a unit after a READ or WRITE with ADVANCE="NO" must reset the position to the beginning of the record, not to the beginnin
[flang][runtime] BACKSPACE after non-advancing I/O
A BACKSPACE statement on a unit after a READ or WRITE with ADVANCE="NO" must reset the position to the beginning of the record, not to the beginning of the previous one.
Differential Revision: https://reviews.llvm.org/D125057
show more ...
|
| #
36771bba |
| 26-Apr-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Correct emission & reading of unterminated final records
When the last operation on a foramtted sequential or stream file (prior to an implied or explicit ENDFILE) is a non-advancin
[flang][runtime] Correct emission & reading of unterminated final records
When the last operation on a foramtted sequential or stream file (prior to an implied or explicit ENDFILE) is a non-advancing WRITE, ensure that any partial record data is emitted to the file without a line terminator. Further, when that last record is read with a non-advancing READ, ensure that it won't raise an end-of-record condition after its data, but instead will signal an end-of-file.
Differential Revision: https://reviews.llvm.org/D124546
show more ...
|
|
Revision tags: llvmorg-14.0.2 |
|
| #
1fe7a187 |
| 12-Apr-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Don't emit empty lines for bad writes
When an error occurs in a formatted sequential output statement and no output was ever emitted, don't emit a blank record. This matches the err
[flang][runtime] Don't emit empty lines for bad writes
When an error occurs in a formatted sequential output statement and no output was ever emitted, don't emit a blank record. This matches the error case behavior of other Fortran compilers.
Differential Revision: https://reviews.llvm.org/D123734
show more ...
|
| #
64aff363 |
| 12-Apr-2022 |
Peter Klausler <[email protected]> |
[flang][runtime] Fix ENDFILE for formatted stream output
A predicate expression made ENDFILE statements significant only for sequential files, but it's applicable to formatted stream output as well.
[flang][runtime] Fix ENDFILE for formatted stream output
A predicate expression made ENDFILE statements significant only for sequential files, but it's applicable to formatted stream output as well.
Differential Revision: https://reviews.llvm.org/D123730
show more ...
|
|
Revision tags: llvmorg-14.0.1 |
|
| #
d2b339f1 |
| 31-Mar-2022 |
Peter Klausler <[email protected]> |
[flang] Respect left tab limit with Tn editing after ADVANCE='NO'
Correct the implementation of non-advancing I/O after some testing to ensure that T tab edit descriptors are not allowed to back up
[flang] Respect left tab limit with Tn editing after ADVANCE='NO'
Correct the implementation of non-advancing I/O after some testing to ensure that T tab edit descriptors are not allowed to back up into positions of a record prior to where it stood at the beginning of the I/O statement.
Differential Revision: https://reviews.llvm.org/D123709
show more ...
|
| #
bafbae23 |
| 16-Mar-2022 |
Peter Klausler <[email protected]> |
[flang] Initial UTF-8 support in runtime I/O
Implements UTF-8 encoding and decoding for external units with OPEN(ENCODING='UTF-8'). This encoding applies to default CHARACTER values that are not 7-
[flang] Initial UTF-8 support in runtime I/O
Implements UTF-8 encoding and decoding for external units with OPEN(ENCODING='UTF-8'). This encoding applies to default CHARACTER values that are not 7-bit ASCII as well as to the wide CHARACTER kinds 2 and 4. Basic testing is in place via direct calls to the runtime I/O APIs, but serious checkout awaits lowering support of the wide CHARACTER kinds.
Differential Revision: https://reviews.llvm.org/D122038
show more ...
|
| #
461b6fe4 |
| 15-Mar-2022 |
Peter Klausler <[email protected]> |
[flang] Expose error recovery cases in external I/O
Some I/O error situations are current handled with fatal runtime asserts, but should be exposed for user program error recovery.
Differential Rev
[flang] Expose error recovery cases in external I/O
Some I/O error situations are current handled with fatal runtime asserts, but should be exposed for user program error recovery.
Differential Revision: https://reviews.llvm.org/D122049
show more ...
|
|
Revision tags: llvmorg-14.0.0 |
|
| #
e3550f19 |
| 11-Mar-2022 |
Peter Steinfeld <[email protected]> |
[flang] Improve runtime crash messages
Where possible, I added additional information to the messages to help programmers figure out what went wrong. I also removed all uses of the word "bad" from
[flang] Improve runtime crash messages
Where possible, I added additional information to the messages to help programmers figure out what went wrong. I also removed all uses of the word "bad" from the messages since (to me) that implies a moral judgement rather than a programming error. I replaced it with either "invalid" or "unsupported" where appropriate.
Differential Revision: https://reviews.llvm.org/D121493
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2 |
|
| #
ef7f6f7c |
| 23-Feb-2022 |
Peter Klausler <[email protected]> |
[flang] Use faster path for default formatted character input
Rather than reading default character variables in formatted input one byte at a time via NextInField(), skip and read them via blocks o
[flang] Use faster path for default formatted character input
Rather than reading default character variables in formatted input one byte at a time via NextInField(), skip and read them via blocks of available buffer data. This eliminates a bottleneck that affected reads of large character values. (It also exposed a problem with sequential reads with RECL= set on the OPEN statement, so that's fixed too.)
Differential Revision: https://reviews.llvm.org/D121144
show more ...
|
| #
507f7317 |
| 18-Feb-2022 |
Peter Klausler <[email protected]> |
[flang] Catch READ/WRITE on direct-access file without REC=
A data transfer statement must have REC= in its control list if (and only if) the unit was opened with ACCESS='DIRECT'. The runtime wasn't
[flang] Catch READ/WRITE on direct-access file without REC=
A data transfer statement must have REC= in its control list if (and only if) the unit was opened with ACCESS='DIRECT'. The runtime wasn't catching this error, but was just silently advancing to the next record as if the access were sequential.
Differential Revision: https://reviews.llvm.org/D120838
show more ...
|
| #
df38f35a |
| 16-Feb-2022 |
Peter Klausler <[email protected]> |
[flang] Allow data transfer stmt control list errors to be caught
The runtime crashes on several fundamental I/O data transfer statement control list errors, like list I/O on a direct-access unit, o
[flang] Allow data transfer stmt control list errors to be caught
The runtime crashes on several fundamental I/O data transfer statement control list errors, like list I/O on a direct-access unit, or input from a write-only unit, &c. These errors should not be fatal when ERR= or IOSTAT= are present.
This patch creates a new ErroneousIoStatementState class and uses it for the state of an I/O statement that is doomed to fail from these errors. If there is no ERR= label or IOSTAT= variable, the error will be raised at the end of the statement. Data transfer operations along the way will be no-op failures.
Differential Revision: https://reviews.llvm.org/D120745
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init |
|
| #
991696c2 |
| 28-Jan-2022 |
Peter Klausler <[email protected]> |
[flang] Debugging of ACCESS='STREAM' I/O (take 2)
Corrects the runtime implementation of I/O on files with the access mode ACCESS='STREAM'. This is a collection of edge-case tweaks to ensure that t
[flang] Debugging of ACCESS='STREAM' I/O (take 2)
Corrects the runtime implementation of I/O on files with the access mode ACCESS='STREAM'. This is a collection of edge-case tweaks to ensure that the distinctions between stream and direct/sequential files, unformatted or formatted, are respected where appropriate.
Moves NextInField() from io-stmt.h to io-stmt.cpp -- it was getting too big to keep in a header.
This patch exposed a problem with the I/O runtime on Windows and it was reverted. This version also fixes that problem; files are now opened on Windows in binary mode to prevent inadvertent insertions of carriage returns before line feeds, and those line endings (CR+LF) are now explicitly generated.
Differential Revision: https://reviews.llvm.org/D119015
show more ...
|