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: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Mar 2008 00:56:15 -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 #6 from kargl at gcc dot gnu dot org 2008-03-20 00:56 -------
(In reply to comment #4)
> 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.
>
The patch does not fix the problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35632