]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR libfortran/48852 (Invalid spaces in list-directed output of complex constants)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 23 Jun 2016 15:58:05 +0000 (15:58 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Thu, 23 Jun 2016 15:58:05 +0000 (15:58 +0000)
commit5b0e27a724e8ddc12065fa1d0848ae7c2495290e
tree15a9936a35c8faea733bb284959bf1f4484f4c85
parentcd64be5bcae8c6f0ccf50aac0e0a16f28e23d042
re PR libfortran/48852 (Invalid spaces in list-directed output of complex constants)

2016-06-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libgfortran/48852
* io/write.c: Cleaned up whitespace.
(write_d, write_e, write_f, write_es, write_en): Use new helper function
write_float_0. (write_float_0): New helper function.
(get_precision, select_buffer, select_string, write_float_string): New
helper functions used in remaining float writing functions. Helper function
write_float_string now contains code for writing to kind=4 character
internal units.
(write_real): Modified to establish working buffers at this level and to
use new helper functions.
(write_real_g0): Likewise modified.
(write_complex): Likewise modified. Gets both float strings before
output so that final lengths can be determined which allows right
justifying the complex number with no intervening spaces.
* io/write_float.def (build_float_string): Renamed from previosly
output_float, modified to use buffers passed in from higher functions,
builds a null terminated string of the floating point value. Character
kind=4 code eliminated.
(write_infnan): Likewise modified to use incoming buffers and eliminate
kind=4 related code.
(OUTPUT_FLOAT_FMT_G): Deleted, functionality moved into FORMAT_FLOAT.
(FORMAT_FLOAT): Renamed macro from WRITE_FLOAT. Use build_float_string.
(get_float_string): Renamed from write_float, uses FORMAT_FLOAT macro.
Buffer allocation removed, now at higher level.

PR libgfortran/48852
* gfortran.dg/char4_iunit_1.f03: Update test.
* gfortran.dg/f2003_io_5.f03: Update test.
* gfortran.dg/real_const_3.f90: Update test.

From-SVN: r237735
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/char4_iunit_1.f03
gcc/testsuite/gfortran.dg/f2003_io_5.f03
gcc/testsuite/gfortran.dg/real_const_3.f90
libgfortran/ChangeLog
libgfortran/io/write.c
libgfortran/io/write_float.def