[Bug fortran/38430] [4.4 Regression]: gfortran.dg/streamio_1.f90, 10, 14, 2, 6 now fails
jvdelisle at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat Dec 6 21:03:00 GMT 2008
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2008-12-06 21:01 -------
I did miss an fbuf_flush. I am not sure why it matters unless it is avoiding
some actual disk operations for us. Try this and let me know.
@@ -2146,7 +2155,10 @@ data_transfer_init (st_parameter_dt *dtp
/* Required for compatibility between 4.3 and 4.4 runtime. Check
to see if we might be reading what we wrote before */
if (dtp->u.p.current_unit->mode == WRITING)
- flush(dtp->u.p.current_unit->s);
+ {
+ fbuf_flush (dtp->u.p.current_unit, 1);
+ flush(dtp->u.p.current_unit->s);
+ }
if (dtp->pos < file_length (dtp->u.p.current_unit->s))
dtp->u.p.current_unit->endfile = NO_ENDFILE;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38430
More information about the Gcc-bugs
mailing list