[all-commits] [llvm/llvm-project] 933882: [flang][runtime] Fix trailing blanks for Gw.dEe ou...

Peter Klausler via All-commits all-commits at lists.llvm.org
Tue Dec 26 15:23:15 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 933882f73971546d529ab225cb9bb982ed5ff47b
      https://github.com/llvm/llvm-project/commit/933882f73971546d529ab225cb9bb982ed5ff47b
  Author: Peter Klausler <35819229+klausler at users.noreply.github.com>
  Date:   2023-12-26 (Tue, 26 Dec 2023)

  Changed paths:
    M flang/runtime/edit-output.cpp

  Log Message:
  -----------
  [flang][runtime] Fix trailing blanks for Gw.dEe output editing (#75263)

When generalized numeric output editing of real data maps to Fw.d output
editing, either two or four trailing blanks are emitted depending on the
presence and value of 'e'. The code that detects field width overflow
didn't take these trailing blanks into account, and sometimes the field
width adjustment was producing an F0.d output edit descriptor (no fixed
field width). Fix by retaining the original field width, but requiring
it to also accommodate the trailing blanks.

Fixes llvm-test-suite/Fortran/gfortran/regression/fmt_g.f.




More information about the All-commits mailing list