public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dje at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/20930] [4.0 Regression] gfortran.dg/backspace.f execution test
Date: Tue, 26 Apr 2005 18:35:00 -0000	[thread overview]
Message-ID: <20050426183309.26429.qmail@sourceware.org> (raw)
In-Reply-To: <20050410163247.20930.danglin@gcc.gnu.org>


------- Additional Comments From dje at gcc dot gnu dot org  2005-04-26 18:33 -------
The problem is due to libgfortran not flushing the record length marker to the 
file.  transfer.c:next_record_w() copies the record length into the buffer, 
but does not ensure that the buffer gets flushed to the file.  At a later 
point, libgfortran seeks past the file position and then back, which the UNIX 
standard allows the OS to fill with zeroes.  next_record_w() calls sfree(), 
but sfree() specifically does not flush the buffer if operating on the 
small_buffer in the unix_stream structure or the stream is buffered.  
Presumably when switching from writing to reading, the buffer should be 
flushed.

The call to REWIND sets the mode to reading and truncates the file before the 
call to flush in data_transfer_init() could occur.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20930


  parent reply	other threads:[~2005-04-26 18:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-10 16:32 [Bug libfortran/20930] New: " danglin at gcc dot gnu dot org
2005-04-10 16:34 ` [Bug libfortran/20930] " pinskia at gcc dot gnu dot org
2005-04-10 16:39 ` danglin at gcc dot gnu dot org
2005-04-10 16:42 ` pinskia at gcc dot gnu dot org
2005-04-25 19:10 ` dje at gcc dot gnu dot org
2005-04-26 18:35 ` dje at gcc dot gnu dot org [this message]
2005-04-26 18:53 ` dje at gcc dot gnu dot org
2005-04-26 21:57 ` [Bug libfortran/20930] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-05-03 18:26 ` pinskia at gcc dot gnu dot org
2005-05-03 22:39 ` dave at hiauly1 dot hia dot nrc dot ca
2005-05-14 20:58 ` [Bug libfortran/20930] [4.0 " danglin at gcc dot gnu dot org
2005-05-15 19:54 ` dje at gcc dot gnu dot org
2005-06-07 19:16 ` dje at gcc dot gnu dot org
2005-06-11 20:21 ` cvs-commit at gcc dot gnu dot org
2005-06-13  3:23 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050426183309.26429.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).