[Bug libfortran/30162] [4.7/4.8 Regression] I/O with named pipes does not work on Darwin

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 18 18:44:00 GMT 2013


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

--- Comment #44 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-02-18 18:44:02 UTC ---
If unformatted sequential ever worked, it was by chance.

Look at this piece of code:

  /* Seek to the head and overwrite the bogus length with the real
     length.  */

  if (unlikely (sseek (dtp->u.p.current_unit->s, - m - 2 * record_marker, 
               SEEK_CUR) < 0))
    goto io_error;

This works if it happens within a buffer, but you cannot rely on that.

I would therefore suggest to resolve this PR by issuing a well-defined
error if we encounter a pipe on opening.

I'll prepare a patch.



More information about the Gcc-bugs mailing list