Skip to content

Commit 4c15a97

Browse files
committed
[flang] Add missing call to BeginReadingRecord()
NAMELIST input needs to start with a call to BeginReadingRecord(). Internal unit input doesn't care (so unit tests were passing), but external unit input does need the call and will assert without it. Differential Revision: https://reviews.llvm.org/D108051
1 parent d7f2885 commit 4c15a97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flang/runtime/namelist.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ bool IONAME(InputNamelist)(Cookie cookie, const NamelistGroup &group) {
263263
auto *listInput{io.get_if<ListDirectedStatementState<Direction::Input>>()};
264264
RUNTIME_CHECK(handler, listInput != nullptr);
265265
// Check the group header
266+
io.BeginReadingRecord();
266267
std::optional<char32_t> next{io.GetNextNonBlank()};
267268
if (!next || *next != '&') {
268269
handler.SignalError(

0 commit comments

Comments
 (0)