]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/39782 (IO depends on uninitialised value)
authorJanne Blomqvist <jb@gcc.gnu.org>
Sat, 18 Apr 2009 10:05:34 +0000 (13:05 +0300)
committerJanne Blomqvist <jb@gcc.gnu.org>
Sat, 18 Apr 2009 10:05:34 +0000 (13:05 +0300)
2009-04-18  Janne Blomqvist  <jb@gcc.gnu.org>

PR libfortran/39782
* io/transfer.c (data_transfer_init): Don't flush before seek.
(finalize_transfer): Remove extra flush.

From-SVN: r146308

libgfortran/ChangeLog
libgfortran/io/transfer.c

index 20a07192b6d6548e89e092a9967c89f003c98f67..6763ad1a993dcae9147ff8e3bc6012b1f56336fa 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-18  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       PR libfortran/39782
+       * io/transfer.c (data_transfer_init): Don't flush before seek.
+       (finalize_transfer): Remove extra flush.
+
 2009-04-17  Janne Blomqvist  <jb@gcc.gnu.org>
 
        * io/io.h (is_preconnected): Remove prototype.
index 94454a6776f405610a40a8974f7f70ab3aede243..27ae89949188089aa5e613cec2909449b5239e76 100644 (file)
@@ -2332,7 +2332,6 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag)
           if (dtp->pos != dtp->u.p.current_unit->strm_pos)
             {
               fbuf_flush (dtp->u.p.current_unit, dtp->u.p.mode);
-              sflush (dtp->u.p.current_unit->s);
               if (sseek (dtp->u.p.current_unit->s, dtp->pos - 1, SEEK_SET) < 0)
                 {
                   generate_error (&dtp->common, LIBERROR_OS, NULL);
@@ -3143,11 +3142,6 @@ finalize_transfer (st_parameter_dt *dtp)
          && dtp->u.p.advance_status != ADVANCE_NO)
        next_record (dtp, 1);
 
-      if (dtp->u.p.current_unit->flags.form == FORM_UNFORMATTED
-         && stell (dtp->u.p.current_unit->s) >= dtp->rec)
-       {
-         sflush (dtp->u.p.current_unit->s);
-       }
       return;
     }