re PR fortran/83191 (Writing a namelist with repeated complex numbers)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 3 Dec 2017 16:47:12 +0000 (16:47 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Sun, 3 Dec 2017 16:47:12 +0000 (16:47 +0000)
commitc4508d0ad7fb8fe23517a6b5e874c4573fdec8a0
tree20e444c84db177bd87ead91a4dd32bcdd4acf3c4
parent7c731281574f7d89c6fed487fe646176603ad98f
re PR fortran/83191 (Writing a namelist with repeated complex numbers)

2017-12-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
            Dominique d'Humieres  <dominiq@lps.ens.fr>

        PR libgfortran/83191
        * io/transfer.c (list_formatted_read_scalar): Do not set
        namelist_mode bit here. (namelist_read): Likewise.
        (data_transfer_init): Clear the mode bit here.
        (finalize_transfer): Do set the mode bit just before any calls
        to namelist_read or namelist_write. It can now be referred to
        in complex_write.
        ^ io/write.c (write_complex): Suppress the leading blanks when
        namelist_mode bit is not set to 1.

        * gfortran.dg/namelist_95.f90: New test.

Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr>
From-SVN: r255365
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/namelist_95.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/io/list_read.c
libgfortran/io/transfer.c
libgfortran/io/write.c