This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: FreeBSD Fortran Failure


>>>>> "Toon" == Toon Moene <toon@moene.indiv.nluug.nl> writes:

    Toon> Then I first have to have an idea where the abort is
    Toon> *really* happening.  Is there an error message involved ?
    Toon> Can you show a traceback in gdb ?

The problem comes in the second call to l_read, coming from this code:

      read(90, *, end=10) j

On GNU/Linux, the second call to lread exits quickly becuase the call
to GETC near the beginning of the routine returns -1.  On FreeBSD, it
doesn't -- it returns a sparc character, followed by the number `2'.
So, we exit that loop, and go to the `rddata' loop.

I think that the reason for this might be that GETC is defined in
terms of stdio, and ftruncate operates on file descriptors.  So, if
the stdio buffer isn't flushed by the call to ftruncate, there could
still appear to be characters present.  Is that possible?

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]