forked from OSchip/llvm-project
[flang] Minor fix to list-directed REAL output editing
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. Differential Revision: https://reviews.llvm.org/D93319
This commit is contained in:
parent
3aa8e071dd
commit
b1afbceb92
|
@ -116,7 +116,7 @@ const char *RealOutputEditingBase::FormatExponent(
|
|||
}
|
||||
}
|
||||
*--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;
|
||||
|
|
Loading…
Reference in New Issue