[flang] Fix Gw.d format output
authorpeter klausler <pklausler@nvidia.com>
Wed, 30 Sep 2020 22:04:43 +0000 (15:04 -0700)
committerpeter klausler <pklausler@nvidia.com>
Thu, 1 Oct 2020 01:02:25 +0000 (18:02 -0700)
commit4fb679d3b159f0a5e4ff87f4e7ecf44fbbf331b9
tree23e65baa2175a0c85438032b07271bd610e7483a
parentd4e889f1f5723105dbab12b749503d2462eb1755
[flang] Fix Gw.d format output

The estimation of the decimal exponent needs to allow for all
'd' of the requested significant digits.

Also accept a plus sign on a "+kP" scaling factor in a format.

Differential revision: https://reviews.llvm.org/D88618
flang/runtime/edit-output.cpp
flang/runtime/format-implementation.h