[flang-commits] [flang] 4c15a97 - [flang] Add missing call to BeginReadingRecord()

peter klausler via flang-commits flang-commits at lists.llvm.org
Tue Aug 17 11:10:35 PDT 2021


Author: peter klausler
Date: 2021-08-17T11:10:25-07:00
New Revision: 4c15a9700b1f6dd0887e106f524010285df12aca

URL: https://github.com/llvm/llvm-project/commit/4c15a9700b1f6dd0887e106f524010285df12aca
DIFF: https://github.com/llvm/llvm-project/commit/4c15a9700b1f6dd0887e106f524010285df12aca.diff

LOG: [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

Added: 
    

Modified: 
    flang/runtime/namelist.cpp

Removed: 
    


################################################################################
diff  --git a/flang/runtime/namelist.cpp b/flang/runtime/namelist.cpp
index 7ca8d5cfb169..4aee148cd1f3 100644
--- a/flang/runtime/namelist.cpp
+++ b/flang/runtime/namelist.cpp
@@ -263,6 +263,7 @@ bool IONAME(InputNamelist)(Cookie cookie, const NamelistGroup &group) {
   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(


        


More information about the flang-commits mailing list