FreeBSD Fortran Failure

Mark Mitchell mark@codesourcery.com
Sun May 13 13:24:00 GMT 2001


>>>>> "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



More information about the Gcc-bugs mailing list