Index: flang/runtime/edit-input.cpp =================================================================== --- flang/runtime/edit-input.cpp +++ flang/runtime/edit-input.cpp @@ -58,15 +58,12 @@ // Returns true if there's a '-' sign. static bool ScanNumericPrefix(IoStatementState &io, const DataEdit &edit, std::optional &next, std::optional &remaining) { - bool bzMode{(edit.modes.editingFlags & blankZero) != 0}; - next = io.PrepareInput(edit, remaining, !bzMode); + next = io.PrepareInput(edit, remaining); bool negative{false}; if (next) { negative = *next == '-'; if (negative || *next == '+') { - if (!bzMode) { - io.SkipSpaces(remaining); - } + io.SkipSpaces(remaining); next = io.NextInField(remaining, edit); } } Index: flang/runtime/io-stmt.h =================================================================== --- flang/runtime/io-stmt.h +++ flang/runtime/io-stmt.h @@ -133,8 +133,8 @@ // For fixed-width fields, initialize the number of remaining characters. // Skip over leading blanks, then return the first non-blank character (if // any). - std::optional PrepareInput(const DataEdit &edit, - std::optional &remaining, bool skipSpaces = true) { + std::optional PrepareInput( + const DataEdit &edit, std::optional &remaining) { remaining.reset(); if (edit.descriptor == DataEdit::ListDirected) { std::size_t byteCount{0}; @@ -143,9 +143,7 @@ if (edit.width.value_or(0) > 0) { remaining = *edit.width; } - if (skipSpaces) { - SkipSpaces(remaining); - } + SkipSpaces(remaining); } return NextInField(remaining, edit); }