OSDN Git Service

2010-11-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Nov 2010 13:51:57 +0000 (13:51 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Nov 2010 13:51:57 +0000 (13:51 +0000)
PR libgfortran/46373
* io/transfer.c (data_transfer_init): Do not call flush_if_preconnected
if this is an internal unit.

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

libgfortran/ChangeLog
libgfortran/io/transfer.c

index f7fe9e1..8e51190 100644 (file)
@@ -1,3 +1,9 @@
+2010-11-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libgfortran/46373
+       * io/transfer.c (data_transfer_init): Do not call flush_if_preconnected
+       if this is an internal unit.
+
 2010-11-04  Janne Blomqvist  <jb@gcc.gnu.org>
 
        PR libfortran/44931
index 05425ca..6f13113 100644 (file)
@@ -2646,7 +2646,8 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag)
     }
 
   /* Bugware for badly written mixed C-Fortran I/O.  */
-  flush_if_preconnected(dtp->u.p.current_unit->s);
+  if (!is_internal_unit (dtp))
+    flush_if_preconnected(dtp->u.p.current_unit->s);
 
   dtp->u.p.current_unit->mode = dtp->u.p.mode;