[Bug fortran/80741] [Regression 7/8] DTIO wrong code causes incorrect behaviour of namelist READ

jvdelisle at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 23 23:05:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80741

--- Comment #9 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Author: jvdelisle
Date: Tue May 23 22:05:56 2017
New Revision: 248390

URL: https://gcc.gnu.org/viewcvs?rev=248390&root=gcc&view=rev
Log:
2017-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        Backport from trunk
        PR libgfortran/80741
        * transfer.c (finalize_transfer): Reset last_char to 'empty'.
        * file_pos.c (formatted_backspace): Likewise.
        (st_endfile): Likewise.
        (st_rewind): Likewise.
        (st_flush): Likewise.

        * trans-io.c (transfer_namelist_element): Change check from
        NULL_TREE to null_pointer_node.

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

Added:
    branches/gcc-7-branch/gcc/testsuite/gfortran.dg/read_4.f90
Modified:
    branches/gcc-7-branch/gcc/fortran/ChangeLog
    branches/gcc-7-branch/gcc/fortran/trans-io.c
    branches/gcc-7-branch/gcc/testsuite/ChangeLog
    branches/gcc-7-branch/libgfortran/ChangeLog
    branches/gcc-7-branch/libgfortran/io/file_pos.c
    branches/gcc-7-branch/libgfortran/io/transfer.c


More information about the Gcc-bugs mailing list