[flang-commits] [PATCH] D110765: [flang] runtime: fix formatted real input regression w/ spaces

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Oct 4 16:47:31 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGf63dafebf4e9: [flang] runtime: fix formatted real input regression w/ spaces (authored by klausler).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110765/new/

https://reviews.llvm.org/D110765

Files:
  flang/runtime/edit-input.cpp


Index: flang/runtime/edit-input.cpp
===================================================================
--- flang/runtime/edit-input.cpp
+++ flang/runtime/edit-input.cpp
@@ -137,7 +137,8 @@
   if (ScanNumericPrefix(io, edit, next, remaining)) {
     Put('-');
   }
-  if (!next) { // empty field means zero
+  if (next.value_or(' ') == ' ') { // empty/blank field means zero
+    remaining.reset();
     Put('0');
     return got;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110765.377053.patch
Type: text/x-patch
Size: 436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211004/5abe9166/attachment.bin>


More information about the flang-commits mailing list