OSDN Git Service

2005-08-08 Jerry DeLisle <jvdelisle@verizon.net>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Aug 2005 01:56:04 +0000 (01:56 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Aug 2005 01:56:04 +0000 (01:56 +0000)
        PR libfortran/23154
        * io/transfer.c (data_transfer_init): Initialize
        current_unit->bytes_left for a read.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102893 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/io/transfer.c

index aed0280..d733fa3 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-08  Jerry DeLisle  <jvdelisle@verizon.net>
+
+        PR libfortran/23154
+        * io/transfer.c (data_transfer_init): Initialize
+        current_unit->bytes_left for a read.
+        
 2005-08-07  Janne Blomqvist  <jblomqvi@cc.hut.fi>
 
        PR fortran/22390
index 72cc2b9..00e8c31 100644 (file)
@@ -1028,7 +1028,9 @@ data_transfer_init (int read_flag)
     {
       current_unit->recl = file_length(current_unit->s);
       if (g.mode==WRITING)
-       empty_internal_buffer (current_unit->s);
+        empty_internal_buffer (current_unit->s);
+      else
+        current_unit->bytes_left = current_unit->recl; 
     }
 
   /* Check the action.  */