http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30162
--- Comment #37 from tkoenig at netcologne dot de <tkoenig at netcologne dot de> 2012-12-22 20:16:07 UTC --- Hi Dominique, > The best I can do (without understanding it) is > > (1) if I use dtruss (should be equivalent to strace) on a, I get > > [macbook] f90/bug% 25210/0x2baef9e: lseek(0x3, 0x0, 0x1) = -1 Err#29 > 25210/0x2baef9e: lseek(0x3, 0xFFFFFFFFFFFFFFF4, 0x1) = -1 Err#29 > > (2) if I use it on b, I get > > [macbook] f90/bug% 25218/0x2baf031: lseek(0x3, 0x0, 0x1) = -1 Err#29 > 25218/0x2baf031: lseek(0x3, 0x4, 0x1) = -1 Err#29 That doesn't point to anything suspicious. Can you tell me what happens if you apply this patch? Index: io/unix.c =================================================================== --- io/unix.c (Revision 194679) +++ io/unix.c (Arbeitskopie) @@ -349,7 +349,7 @@ /* Non-seekable files should always be assumed to be at current position. */ - if (x == -1 && errno == ESPIPE) + if (x == -1) x = 0; return x;