[Bug libfortran/33985] access="stream",form="unformatted" doesn't buffer

tkoenig at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Dec 1 22:19:00 GMT 2007



------- Comment #23 from tkoenig at gcc dot gnu dot org  2007-12-01 22:19 -------
I'm studying why we get a regression in backspace_6.f, and
I'm confused by fd_alloc_r_at:



  gfc_offset m;

  if (where == -1)
    where = s->logical_offset;
...

What happens if where != -1 (if we use salloc_r_at)
and we hit the lines

  m = where + s->active;

  if (s->physical_offset != m && lseek (s->fd, m, SEEK_SET) < 0)
    return NULL;

I don't think this is correct.

We only use salloc_r_at form in backspace, so this
might be the reason for some mysterious bugs there.


-- 


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



More information about the Gcc-bugs mailing list