------- Comment #1 from jvdelisle at gcc dot gnu dot org 2006-01-18 02:12
-------
The following chunk from fd_alloc is where the problem occurs. Get rid of
setting active to zero and the error goes away, but regression occurs in
direct_io_2.f90. Perhaps active needs to be set to zero somewhere else.
/* Salvage bytes currently within the buffer. This is important for
* devices that cannot seek. */
if (s->buffer != NULL && s->buffer_offset <= where &&
where <= s->buffer_offset + s->active)
{
n = s->active - (where - s->buffer_offset);
memmove (new_buffer, s->buffer + (where - s->buffer_offset), n);
s->active = n;
}
else
{ /* new buffer starts off empty */
s->active = 0; /* Don't execute this line to make case work.
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25835