This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35632] [Regression] stream io broken on FreeBSD due to ftruncate changes.
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2008 05:25:01 -0000
- Subject: [Bug fortran/35632] [Regression] stream io broken on FreeBSD due to ftruncate changes.
- References: <bug-35632-10110@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2008-03-19 05:25 -------
Since I do not have access to this system, can you try this:
Index: transfer.c
===================================================================
--- transfer.c (revision 133275)
+++ transfer.c (working copy)
@@ -2604,7 +2604,8 @@ next_record_w (st_parameter_dt *dtp, int
if (is_stream_io (dtp))
{
dtp->u.p.current_unit->strm_pos += len;
- struncate(dtp->u.p.current_unit->s);
+ if (done)
+ struncate(dtp->u.p.current_unit->s);
}
}
streamio_15.f90 passes with this and it should reduce the number of calls to
truncate. If this fixes it, then I would think we have some other latent bug
and not really fixed it.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-03-19 05:25:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35632