[flang-commits] [PATCH] D93319: [flang] Minor fix to list-directed REAL output editing

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Dec 15 10:52:00 PST 2020


klausler created this revision.
klausler added a reviewer: PeteSteinfeld.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
klausler requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Always emit the letter 'E' in list-directed REAL output;
the library was omitting it for exponents greater than 99,
as should be done for E and D formatting of large exponents
without an Ed exponent digit count.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93319

Files:
  flang/runtime/edit-output.cpp


Index: flang/runtime/edit-output.cpp
===================================================================
--- flang/runtime/edit-output.cpp
+++ flang/runtime/edit-output.cpp
@@ -116,7 +116,7 @@
     }
   }
   *--exponent = expo < 0 ? '-' : '+';
-  if (edit.expoDigits || exponent + 3 == eEnd) {
+  if (edit.expoDigits || edit.IsListDirected() || exponent + 3 == eEnd) {
     *--exponent = edit.descriptor == 'D' ? 'D' : 'E'; // not 'G'
   }
   length = eEnd - exponent;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93319.311964.patch
Type: text/x-patch
Size: 469 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20201215/2f5f4a80/attachment.bin>


More information about the flang-commits mailing list