This is the mail archive of the 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]

[Patch, libgfortran] PR38688 Unnecessary flush with advance='no'


the attached patch removes the flush at the end of a data transfer
statement with advance='no'. As tty I/O is done unbuffered anyway, the
usual case of using advance='no' for waiting on interactive I/O
continues to work.

I'll commit it in ~24 hours unless someone objects, as it's a rather
obvious one-liner.

Janne Blomqvist
2009-04-15  Janne Blomqvist  <>

	PR libfortran/38688
	* io/transfer.c (finalize_transfer): Don't flush for advance='no'.
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index 717041d..94454a6 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -3169,7 +3169,6 @@ finalize_transfer (st_parameter_dt *dtp)
       dtp->u.p.current_unit->saved_pos =
 	dtp->u.p.max_pos > 0 ? dtp->u.p.max_pos - bytes_written : 0;
       fbuf_flush (dtp->u.p.current_unit, dtp->u.p.mode);
-      sflush (dtp->u.p.current_unit->s);
   else if (dtp->u.p.current_unit->flags.form == FORM_FORMATTED 

Attachment: signature.asc
Description: OpenPGP digital signature

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