[Bug libfortran/78549] Very slow formatted internal file output

jvdelisle at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 14 02:31:00 GMT 2017


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

--- Comment #31 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Author: jvdelisle
Date: Thu Dec 14 02:30:49 2017
New Revision: 255621

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

        PR libgfortran/78549
        * io/inquire.c (inquire_via_unit): Adjust test for existence for
        pre-connected internal units.
        * io/transfer.c (finalize_transfer): When done with a transfer
        to internal units, free the format buffer and close the stream.
        (st_read_done): Delete freeing the stream, now handled using
        sclose in finalize_transfer. (st_write_done): Likewise.
        * io/unit.c (get_unit): Return NULL for special reserved unit
        numbers, signifying not accessible to the user.
        (init_units): Insert the two special internal units into the
        unit treap. This makes these unit structures available without
        further allocations for later use by internal unit I/O. These
        units are automatically deleted by normal program termination.
        * io/unix.c (mem_close): Add a guard check to protect from double free.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/io/inquire.c
    trunk/libgfortran/io/transfer.c
    trunk/libgfortran/io/unit.c
    trunk/libgfortran/io/unix.c


More information about the Gcc-bugs mailing list