[all-commits] [llvm/llvm-project] dfea01: [flang] Fix regression from recent runtime input fix

Peter Klausler via All-commits all-commits at lists.llvm.org
Tue Aug 17 10:13:12 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dfea011a37797f77ef526880694254cb6e655a8e
      https://github.com/llvm/llvm-project/commit/dfea011a37797f77ef526880694254cb6e655a8e
  Author: peter klausler <pklausler at nvidia.com>
  Date:   2021-08-17 (Tue, 17 Aug 2021)

  Changed paths:
    M flang/runtime/connection.h
    M flang/runtime/io-stmt.cpp
    M flang/runtime/io-stmt.h
    M flang/runtime/unit.cpp

  Log Message:
  -----------
  [flang] Fix regression from recent runtime input fix

A recent runtime I/O change[1] was meant to improve the handling of
input from external files missing a terminal newline on their last
records; the change was "triggered" by the wrong circumstances and
causing reads that should have pulled more data into the buffer to be
treated as EOFs.  So fix that, and also don't retain input data
in the buffer once an input record has been finished unless it's
known that list-directed or NAMELIST input of a repeated input item
may need to backspace a non-positionable external unit to return
to the beginning of the repeated item.

[1] 6578893a0453384346f149479f8574dfff977ace

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




More information about the All-commits mailing list