From: Paul Thomas Date: Thu, 4 Aug 2005 20:26:29 +0000 (+0000) Subject: transfer.c (data_transfer_init): Truncate file in sequential WRITE when last_record... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9427924ef875340a2563e542e973935b7927e672;p=gcc.git transfer.c (data_transfer_init): Truncate file in sequential WRITE when last_record == 0, rather than current_record. 2005-08-04 Paul Thomas * transfer.c (data_transfer_init): Truncate file in sequential WRITE when last_record == 0, rather than current_record. Cures problem on RH9. From-SVN: r102746 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index e725012e0f5..35f21d90eb7 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2005-08-04 Paul Thomas + + * transfer.c (data_transfer_init): Truncate file in + sequential WRITE when last_record == 0, rather than + current_record. Cures problem on RH9. + 2005-08-03 Francois-Xavier Coudert * libgfortran.h: When isfinite is not provided by the system, diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 357e090f2b7..72cc2b9bcbb 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -1171,7 +1171,7 @@ data_transfer_init (int read_flag) it is always safe to truncate the file on the first write */ if (g.mode == WRITING && current_unit->flags.access == ACCESS_SEQUENTIAL - && current_unit->current_record == 0) + && current_unit->last_record == 0) struncate(current_unit->s); current_unit->mode = g.mode;