[flang-commits] [PATCH] D108051: [flang] Add missing call to BeginReadingRecord()

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Aug 13 12:04:45 PDT 2021


klausler created this revision.
klausler added a reviewer: MatsPetersson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.

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.


https://reviews.llvm.org/D108051

Files:
  flang/runtime/namelist.cpp


Index: flang/runtime/namelist.cpp
===================================================================
--- flang/runtime/namelist.cpp
+++ flang/runtime/namelist.cpp
@@ -263,6 +263,7 @@
   auto *listInput{io.get_if<ListDirectedStatementState<Direction::Input>>()};
   RUNTIME_CHECK(handler, listInput != nullptr);
   // Check the group header
+  io.BeginReadingRecord();
   std::optional<char32_t> next{io.GetNextNonBlank()};
   if (!next || *next != '&') {
     handler.SignalError(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108051.366332.patch
Type: text/x-patch
Size: 482 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210813/cc489c41/attachment.bin>


More information about the flang-commits mailing list