This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/43265] [4.3/4.4/4.5 Regression] No EOF condition if reading with '(x)' from an empty file



------- Comment #23 from jvdelisle at gcc dot gnu dot org  2010-03-18 03:52 -------
Subject: Bug 43265

Author: jvdelisle
Date: Thu Mar 18 03:51:43 2010
New Revision: 157532

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157532
Log:
2010-03-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libfortran/43265
        * io/io.h: Delete prototype for read_sf, making it static.
        * io/read.c (read_x): Modify to call hit_eof if PAD="no".
        * io/transfer.c (read_sf_internal): New static function extracted from
        read_sf for use on internal units only. Handle empty string case.
        (read_sf): New factoring of this function, make it static.  Add special
        conditions for EOF based on ADVANCE="no", PAD="no", and whether any
        bytes have been previously read from the record.
        (read_block_form): Modify to call read_sf or read_sf_internal.
        (next_record_r): Add a done flag similar to next_record_w. Call hit_eof
        if internal array unit next record returns finished, meaning an EOF was
        found and not done, ie not the last record expected.  For external
        units call hit_eof if item_count is 1 or there are no pending spaces.
        (next_record): Update call to next_record_r.

Modified:
    branches/gcc-4_4-branch/libgfortran/ChangeLog
    branches/gcc-4_4-branch/libgfortran/io/io.h
    branches/gcc-4_4-branch/libgfortran/io/read.c
    branches/gcc-4_4-branch/libgfortran/io/transfer.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43265


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]