History log of /llvm-project/flang/runtime/edit-input.cpp (Results 26 – 50 of 71)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: 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, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3
# 514b759a 14-Aug-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Catch input error case of missing integer value

Formatted input allows for an empty numeric input field, which
signifies a zero value, but list-directed and NAMELIST input does
not

[flang][runtime] Catch input error case of missing integer value

Formatted input allows for an empty numeric input field, which
signifies a zero value, but list-directed and NAMELIST input does
not -- apart from the special case of a NAMELIST array.

Differential Revision: https://reviews.llvm.org/D132178

show more ...


Revision tags: llvmorg-15.0.0-rc2
# bad52055 03-Aug-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Support internal I/O to CHARACTER(KIND/=1)

Allow internal I/O to support non-default kinds of CHARACTER.

The I/O runtime design anticipated this standard feature, but
this patch is

[flang][runtime] Support internal I/O to CHARACTER(KIND/=1)

Allow internal I/O to support non-default kinds of CHARACTER.

The I/O runtime design anticipated this standard feature, but
this patch is somewhat larger than I thought it would be because
many code sites had to have assumptions about units (characters
vs. bytes) brought into harmony, and some encoding utilities
had to be pulled out of IoStatementState and templatized into
their own new header file so that they are available to formatted
output code without having to "thread" an IoStatementState reference
through many call chains.

Differential Revision: https://reviews.llvm.org/D131107

show more ...


Revision tags: llvmorg-15.0.0-rc1, llvmorg-16-init
# cb193931 08-Jul-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Complete list-directed character input with DECIMAL='COMMA'

Most of the infrastructure for DECIMAL='COMMA' mode was in place
in the I/O runtime support library, but I dropped the ba

[flang][runtime] Complete list-directed character input with DECIMAL='COMMA'

Most of the infrastructure for DECIMAL='COMMA' mode was in place
in the I/O runtime support library, but I dropped the ball for
list-directed character input, which has its own detection of
input separators. Finish the job.

Differential Revision: https://reviews.llvm.org/D129679

show more ...


Revision tags: llvmorg-14.0.6
# ede42131 17-Jun-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Handle READ of non-UTF-8 data into multi-byte CHARACTER

When a READ statement reads into a CHARACTER(2 or 4) variable from a
unit whose encoding is not UTF-8, don't copy bytes direc

[flang][runtime] Handle READ of non-UTF-8 data into multi-byte CHARACTER

When a READ statement reads into a CHARACTER(2 or 4) variable from a
unit whose encoding is not UTF-8, don't copy bytes directly; they must
each be zero-extended.

Differential Revision: https://reviews.llvm.org/D128390

show more ...


# 8ef10753 10-Jun-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Signal END from character input

There's code in EditCharacterInput() that causes that template function
to silently return false if it is invoked at the end of the input file.
This

[flang][runtime] Signal END from character input

There's code in EditCharacterInput() that causes that template function
to silently return false if it is invoked at the end of the input file.
This overrides other checks that properly call SignalEnd() later.

Differential Revision: https://reviews.llvm.org/D127786

show more ...


Revision tags: llvmorg-14.0.5
# 850097d6 08-Jun-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Don't loop in runtime if blank appears in BOZ input

The code for scanning BOZ input allows for blanks and tabs to appear,
but can hang if they do and the BOZ input value is not foll

[flang][runtime] Don't loop in runtime if blank appears in BOZ input

The code for scanning BOZ input allows for blanks and tabs to appear,
but can hang if they do and the BOZ input value is not followed by
extra valid digits; the repositioning for the second sweep simply
needed to be done in units of character, not valid digits.

Differential Revision: https://reviews.llvm.org/D127431

show more ...


# 4c42e67b 09-Jun-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Fix overflow detection for REAL input

The test for an overflow during decimal->binary conversion was taking
place too late, causing the data not to be rescanned from the beginning.

[flang][runtime] Fix overflow detection for REAL input

The test for an overflow during decimal->binary conversion was taking
place too late, causing the data not to be rescanned from the beginning.

Differential Revision: https://reviews.llvm.org/D127427

show more ...


# 9c54d762 03-Jun-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Signal new I/O error on floating-point input overflow

Besides raising the IEEE floating-point overflow exception, treat
a floating-point overflow on input as an I/O error catchable

[flang][runtime] Signal new I/O error on floating-point input overflow

Besides raising the IEEE floating-point overflow exception, treat
a floating-point overflow on input as an I/O error catchable with
ERR=, IOSTAT=, &/or IOMSG=.

Differential Revision: https://reviews.llvm.org/D127022

show more ...


Revision tags: llvmorg-14.0.4
# cdd54cbd 20-May-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Catch decimal integer input overflow

B/O/Z input overflow is already caught, and real input overflow
is signalled as an IEEE arithmetic exception, but regular decimal
integer overfl

[flang][runtime] Catch decimal integer input overflow

B/O/Z input overflow is already caught, and real input overflow
is signalled as an IEEE arithmetic exception, but regular decimal
integer overflow was silent.

Differential Revision: https://reviews.llvm.org/D126155

show more ...


Revision tags: llvmorg-14.0.3
# cea8b8a7 27-Apr-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Don't pad CHARACTER input at end of record unless PAD='YES'

When formatted CHARACTER input runs into the end of an input record,
the runtime usually fills the remainder of the varia

[flang][runtime] Don't pad CHARACTER input at end of record unless PAD='YES'

When formatted CHARACTER input runs into the end of an input record,
the runtime usually fills the remainder of the variable with spaces,
but this should be conditional, and not done when PAD='NO'.

And while here, add some better comments to two members of connection.h
to make their non-obvious relationship more clear.

Differential Revision: https://reviews.llvm.org/D125053

show more ...


# 2f31b4b1 26-Apr-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Fix input of NAN(...) on non-fast path

The closing parenthesis needs to be consumed when a NaN
with parenthesized (ignored) information is read on the
real input path that preproces

[flang][runtime] Fix input of NAN(...) on non-fast path

The closing parenthesis needs to be consumed when a NaN
with parenthesized (ignored) information is read on the
real input path that preprocesses input characters before
passing them to the decimal-to-binary converter.

Differential Revision: https://reviews.llvm.org/D125048

show more ...


# 53f775bb 27-Apr-2022 Peter Klausler <pklausler@nvidia.com>

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

This is a common extension, though semantics differ across
compilers. I've chosen to interpret the CHARACTER data
as if it were an arbitrary-prec

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

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.

Differential Revision: https://reviews.llvm.org/D124547

show more ...


Revision tags: llvmorg-14.0.2
# f1dbf8e4 13-Apr-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Fix edge-case FP input bugs

Blanks are allowed in more places than I allowed for, and
"NAN(foobar)" is allowed to have any parenthesis-balanced
characters in parentheses.

Update: F

[flang][runtime] Fix edge-case FP input bugs

Blanks are allowed in more places than I allowed for, and
"NAN(foobar)" is allowed to have any parenthesis-balanced
characters in parentheses.

Update: Fix up old sanity test, then avoid usage of "limit" when null.

Differential Revision: https://reviews.llvm.org/D124294

show more ...


# 839f0abd 21-Apr-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Accept "." as REAL input

".", possibly followed by an exponent, is a valid REAL input value (meaning zero).

Differential Revision: https://reviews.llvm.org/D124279


# cbbc6629 21-Apr-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Ignore leading spaces even in BZ mode

When editing numeric input, always skip leading spaces, even if
BZ mode (or BLANK='ZERO') is in effect; otherwise, a sign character
preceded by

[flang][runtime] Ignore leading spaces even in BZ mode

When editing numeric input, always skip leading spaces, even if
BZ mode (or BLANK='ZERO') is in effect; otherwise, a sign character
preceded by blanks will not be recognized.

Differential Revision: https://reviews.llvm.org/D124278

show more ...


Revision tags: llvmorg-14.0.1
# e6873bfb 06-Apr-2022 Peter Klausler <pklausler@nvidia.com>

[flang][runtime] Don't skip input spaces when they are significant

When formatted input (not list-directed or NAMELIST) is in "BZ" mode,
either because a BZ control edit descriptor appeared in a FOR

[flang][runtime] Don't skip input spaces when they are significant

When formatted input (not list-directed or NAMELIST) is in "BZ" mode,
either because a BZ control edit descriptor appeared in a FORMAT or
BLANK="ZERO" appeared in OPEN or READ, input editing must not skip
over blanks before or within the input field.

Differential Revision: https://reviews.llvm.org/D123725

show more ...


# de026aeb 04-Apr-2022 Peter Klausler <pklausler@nvidia.com>

[flang] Raise FP exceptions from runtime conversion to binary

Formatted READs of REAL should convert the exception flags from
the decimal-to-binary conversion library into real runtime FP
exceptions

[flang] Raise FP exceptions from runtime conversion to binary

Formatted READs of REAL should convert the exception flags from
the decimal-to-binary conversion library into real runtime FP
exceptions so that they at least show up in the termination message
of a STOP statement.

Differential Revision: https://reviews.llvm.org/D123714

show more ...


# bafbae23 16-Mar-2022 Peter Klausler <pklausler@nvidia.com>

[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 ...


Revision tags: llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2
# ef7f6f7c 23-Feb-2022 Peter Klausler <pklausler@nvidia.com>

[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 ...


Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init
# 991696c2 28-Jan-2022 Peter Klausler <pklausler@nvidia.com>

[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 ...


# 4e53e283 03-Feb-2022 Andrzej Warzynski <andrzej.warzynski@arm.com>

Revert "[flang] Debugging of ACCESS='STREAM' I/O"

This reverts commit be9946b877add0db906090d22840b213c3f41dd2.

This change has caused Flang's Windows buildbot to start failing:
* https://lab.llvm.

Revert "[flang] Debugging of ACCESS='STREAM' I/O"

This reverts commit be9946b877add0db906090d22840b213c3f41dd2.

This change has caused Flang's Windows buildbot to start failing:
* https://lab.llvm.org/buildbot/#/builders/172/builds/7664

show more ...


# be9946b8 28-Jan-2022 Peter Klausler <pklausler@nvidia.com>

[flang] Debugging of ACCESS='STREAM' I/O

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 distin

[flang] Debugging of ACCESS='STREAM' I/O

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.

Differential Revision: https://reviews.llvm.org/D118834

show more ...


# 0f5c60f1 27-Jan-2022 Peter Klausler <pklausler@nvidia.com>

[flang] Fix edge-case I/O regressions

A blank field in an input record that exists must be interpreted
as a zero value for numeric input editing, but advancing to a
next record that doesn't exist sh

[flang] Fix edge-case I/O regressions

A blank field in an input record that exists must be interpreted
as a zero value for numeric input editing, but advancing to a
next record that doesn't exist should leave an input variable
unmodified (and signal END=). On internal output, blank fill
the "current record" array element even if nothing has been
written to it if it is the only record.

Differential Revision: https://reviews.llvm.org/D118720

show more ...


Revision tags: llvmorg-13.0.1, llvmorg-13.0.1-rc3
# 896a543e 20-Jan-2022 Peter Klausler <pklausler@nvidia.com>

[flang] Support DECIMAL='COMMA' mode in namelist I/O

DECIMAL='COMMA' mode affects item separators, real editing, and
complex editing.

Differential Revision: https://reviews.llvm.org/D117906


Revision tags: llvmorg-13.0.1-rc2
# ac4202fe 07-Jan-2022 Peter Klausler <pklausler@nvidia.com>

[flang] Signal runtime error on WRITE after ENDFILE

After an ENDFILE statement, a WRITE is an error without
a prior BACKSPACE. Also fix the return value for the case
of formatted integer input with

[flang] Signal runtime error on WRITE after ENDFILE

After an ENDFILE statement, a WRITE is an error without
a prior BACKSPACE. Also fix the return value for the case
of formatted integer input with no input digits to be false
(exposed by new test).

Differential Revision: https://reviews.llvm.org/D117346

show more ...


123