This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/31099] [4.3/4.2 regression] Runtime error on legal code using RECL
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Mar 2007 12:29:05 -0000
- Subject: [Bug libfortran/31099] [4.3/4.2 regression] Runtime error on legal code using RECL
- References: <bug-31099-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2007-03-09 12:29 -------
The error setting happens in io/transfer.c's write_buf:
--------------------
/* Unformatted sequential. */
have_written = 0;
if (dtp->u.p.current_unit->flags.has_recl
&& (gfc_offset) nbytes > dtp->u.p.current_unit->bytes_left)
{
printf("write_buf: has_recl=%d, nbytes=%ld, bytes_left=%ld\n",
dtp->u.p.current_unit->flags.has_recl, nbytes,
dtp->u.p.current_unit->bytes_left);
nbytes = dtp->u.p.current_unit->bytes_left;
short_record = 1;
}
else
short_record = 0;
--------------------
My added printf shows:
write_buf: has_recl=1, nbytes=4, bytes_left=0
The check was added in Thomas' record length patch PR 29568.
http://gcc.gnu.org/viewcvs/trunk/libgfortran/io/transfer.c?r1=119087&r2=119412&diff_format=h
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org, tkoenig at gcc dot gnu
| |dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31099