<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/flang-rt/lib/runtime/io-stmt.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[flang][runtime] Allow some list-directed child output to advance (#166847)</title>
<updated>2025-11-07T16:42:04+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-11-07T16:42:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1baf7dbed2083a42f71d9e14149490b5f3ce67e3'/>
<id>1baf7dbed2083a42f71d9e14149490b5f3ce67e3</id>
<content type='text'>
List-directed child input is allowed to advance to new records in some
circumstances, and list-directed output should be as well so that e.g.
NAMELIST output via a defined WRITE(FORMATTED) generic doesn't get
truncated by FORT_FMT_RECL.

Fixes https://github.com/llvm/llvm-project/issues/166804.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
List-directed child input is allowed to advance to new records in some
circumstances, and list-directed output should be as well so that e.g.
NAMELIST output via a defined WRITE(FORMATTED) generic doesn't get
truncated by FORT_FMT_RECL.

Fixes https://github.com/llvm/llvm-project/issues/166804.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Let more list-directed child input advance (#160590)</title>
<updated>2025-09-30T17:35:06+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-09-30T17:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=673e3051b0ededcf9e028a86faae6d2ba8b09daa'/>
<id>673e3051b0ededcf9e028a86faae6d2ba8b09daa</id>
<content type='text'>
Whether list-directed child READ statements should be allowed to advance
to further records is neither explicit in the standard nor consistent in
existing Fortran implementations. We allow child namelist READ
statements to advance, but not other list- directed child input.

This patch refines our interpretation of this case. Child namelist READ
statements continue to be able to advance; in addition, non-namelist
child READ statements can now advance if their parent READ statement is
a list-directed input statement at the top level, or a child that could.
But non-namelist list-directed child input taking place in a context
with explicit format control won't advance to following records, so that
the format-controlled parent READ statement can retain control over
record advancement.

Also corrects two cases of record repositioning in numeric input
editing, which were failing under child input because they weren't
allowing for left tab limits.

Fixes https://github.com/llvm/llvm-project/issues/160351.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Whether list-directed child READ statements should be allowed to advance
to further records is neither explicit in the standard nor consistent in
existing Fortran implementations. We allow child namelist READ
statements to advance, but not other list- directed child input.

This patch refines our interpretation of this case. Child namelist READ
statements continue to be able to advance; in addition, non-namelist
child READ statements can now advance if their parent READ statement is
a list-directed input statement at the top level, or a child that could.
But non-namelist list-directed child input taking place in a context
with explicit format control won't advance to following records, so that
the format-controlled parent READ statement can retain control over
record advancement.

Also corrects two cases of record repositioning in numeric input
editing, which were failing under child input because they weren't
allowing for left tab limits.

Fixes https://github.com/llvm/llvm-project/issues/160351.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Use dumber but faster check for list-directed repeti… (#159867)</title>
<updated>2025-09-23T22:45:35+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-09-23T22:45:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ea5262ffc95a767cb5a4b0ea6f04857e4aa00c46'/>
<id>ea5262ffc95a767cb5a4b0ea6f04857e4aa00c46</id>
<content type='text'>
…tion

When scanning list-directed input for nulls and repetition counts, the
current library depends on having each record be prescanned for the
presence of asterisk characters. It turns out that the overhead of
calling memchr(...,'*',...) on each record doesn't pay off, especially
on systems without SIMD-vectorized memchr implementations -- even on
those, it's faster (about 10%) to just scan ahead for asterisks when
decimal digits are encountered. Only when an asterisk is present, which
is not common, should we then bother to convert the digits to their
integer value.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
…tion

When scanning list-directed input for nulls and repetition counts, the
current library depends on having each record be prescanned for the
presence of asterisk characters. It turns out that the overhead of
calling memchr(...,'*',...) on each record doesn't pay off, especially
on systems without SIMD-vectorized memchr implementations -- even on
those, it's faster (about 10%) to just scan ahead for asterisks when
decimal digits are encountered. Only when an asterisk is present, which
is not common, should we then bother to convert the digits to their
integer value.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Preserve some list-directed input state in child (#157571)</title>
<updated>2025-09-10T16:31:14+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-09-10T16:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=71389a5c7bbcf1b2200f5434d794e6ee44c59e4b'/>
<id>71389a5c7bbcf1b2200f5434d794e6ee44c59e4b</id>
<content type='text'>
Child list-directed input needs to inherit and return the state used to
process trailing separators (eatComma_) and terminal '/' (hitSlash_)
from any parent list-directed input statement.

Fixes https://github.com/llvm/llvm-project/issues/157509 and
https://github.com/llvm/llvm-project/issues/154971.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Child list-directed input needs to inherit and return the state used to
process trailing separators (eatComma_) and terminal '/' (hitSlash_)
from any parent list-directed input statement.

Fixes https://github.com/llvm/llvm-project/issues/157509 and
https://github.com/llvm/llvm-project/issues/154971.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime][NFC] Clean up Fortran::common::optional&lt;&gt; usage (#155728)</title>
<updated>2025-08-29T15:06:01+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-08-29T15:06:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7689db874d38bc9e8aeeb02448f0091286105f93'/>
<id>7689db874d38bc9e8aeeb02448f0091286105f93</id>
<content type='text'>
When somebody replaced uses of std::optional&lt;&gt; in the runtime with a new
optional&lt;&gt; defined locally, many needless top-level Fortran:: namespace
qualifiers were added, which are inconsistent with namespace usage in
the runtime. Clean them up.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When somebody replaced uses of std::optional&lt;&gt; in the runtime with a new
optional&lt;&gt; defined locally, many needless top-level Fortran:: namespace
qualifiers were added, which are inconsistent with namespace usage in
the runtime. Clean them up.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Allow child NAMELIST input to advance records (#153963)</title>
<updated>2025-08-18T21:44:48+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-08-18T21:44:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9a7a16c8d5a5927bfadd05e01c288a4fada00830'/>
<id>9a7a16c8d5a5927bfadd05e01c288a4fada00830</id>
<content type='text'>
NAMELIST input in child I/O is rare, and it's not clear in the standard
whether it should be allowed to advance to later records in the parent
unit. But GNU Fortran supports it, and there's no good reason not to do
so since a NAMELIST input group that isn't terminated on the same line
is otherwise going to be a fatal error.

Fixes https://github.com/llvm/llvm-project/issues/153416.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
NAMELIST input in child I/O is rare, and it's not clear in the standard
whether it should be allowed to advance to later records in the parent
unit. But GNU Fortran supports it, and there's no good reason not to do
so since a NAMELIST input group that isn't terminated on the same line
is otherwise going to be a fatal error.

Fixes https://github.com/llvm/llvm-project/issues/153416.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Catch bad OPEN specifiers for unformatted files (#153707)</title>
<updated>2025-08-18T21:44:23+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-08-18T21:44:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ffec26698080b3db8ef7726e4e5cf6029f07b02b'/>
<id>ffec26698080b3db8ef7726e4e5cf6029f07b02b</id>
<content type='text'>
When an OPEN statement has specifiers that are allowed only for
formatted files, detect an error when the file turns out to be
unformatted.

Fixes https://github.com/llvm/llvm-project/issues/153480.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When an OPEN statement has specifiers that are allowed only for
formatted files, detect an error when the file turns out to be
unformatted.

Fixes https://github.com/llvm/llvm-project/issues/153480.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Handle NAN(...) in namelist input (#153101)</title>
<updated>2025-08-13T21:37:41+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-08-13T21:37:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=925db844cb47be46f12e6f8b3696e22a9925e986'/>
<id>925db844cb47be46f12e6f8b3696e22a9925e986</id>
<content type='text'>
The various per-type functions for list-directed (including namelist)
input editing all call a common function to detect whether the next
token of input is the name of a namelist item. This check simply
determines whether this next token looks like an identifier followed by
'=', '(', or '%', and this fails when the next item of input is a NAN
with parenthesized stuff afterwards. Make the check smarter so that it
ensures that any upcoming possible identifier is actually the name of an
item in the namelist group. (And that's tricky too when the group has an
array item named "nan" and the upcoming input is "nan("; see the
newly-added unit test case.)

Fixes https://github.com/llvm/llvm-project/issues/152538.

more</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The various per-type functions for list-directed (including namelist)
input editing all call a common function to detect whether the next
token of input is the name of a namelist item. This check simply
determines whether this next token looks like an identifier followed by
'=', '(', or '%', and this fails when the next item of input is a NAN
with parenthesized stuff afterwards. Make the check smarter so that it
ensures that any upcoming possible identifier is actually the name of an
item in the namelist group. (And that's tricky too when the group has an
array item named "nan" and the upcoming input is "nan("; see the
newly-added unit test case.)

Fixes https://github.com/llvm/llvm-project/issues/152538.

more</pre>
</div>
</content>
</entry>
<entry>
<title>[flang][runtime] Fix child input bugs under NAMELIST (#151571)</title>
<updated>2025-08-05T20:39:08+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-08-05T20:39:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aec90f2f27317dbb075a5a816e11b4892f035680'/>
<id>aec90f2f27317dbb075a5a816e11b4892f035680</id>
<content type='text'>
When NAMELIST input takes place on a derived type, we need to preserve
the type in the descriptor that is created for storage sequence
association. Further, the fact that any child list input in within the
context of a NAMELIST must be inherited so that input fields don't try
to consume later "variable=" strings.

Fixes https://github.com/llvm/llvm-project/issues/151222.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When NAMELIST input takes place on a derived type, we need to preserve
the type in the descriptor that is created for storage sequence
association. Further, the fact that any child list input in within the
context of a NAMELIST must be inherited so that input fields don't try
to consume later "variable=" strings.

Fixes https://github.com/llvm/llvm-project/issues/151222.</pre>
</div>
</content>
</entry>
<entry>
<title>[flang] Support fixed-width input field truncation for LOGICAL (#151203)</title>
<updated>2025-07-30T18:42:14+00:00</updated>
<author>
<name>Peter Klausler</name>
<email>pklausler@nvidia.com</email>
</author>
<published>2025-07-30T18:42:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=35cabd69e694a2ba326f406f38b93a21d6c26108'/>
<id>35cabd69e694a2ba326f406f38b93a21d6c26108</id>
<content type='text'>
As a common extension, we support the truncation of fixed-width fields
for non-list-directed input editing when a separator character (',' or
';' depending on DECIMAL='POINT' or 'COMMA' resp.) appears in the field.
This isn't working for L input editing; fix.

(The bug reports a failure with DC mode, but it doesn't work with a
comma either.)

Fixes https://github.com/llvm/llvm-project/issues/151178.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As a common extension, we support the truncation of fixed-width fields
for non-list-directed input editing when a separator character (',' or
';' depending on DECIMAL='POINT' or 'COMMA' resp.) appears in the field.
This isn't working for L input editing; fix.

(The bug reports a failure with DC mode, but it doesn't work with a
comma either.)

Fixes https://github.com/llvm/llvm-project/issues/151178.</pre>
</div>
</content>
</entry>
</feed>
