FORTRAN tty input/output bug
Fri Apr 30 23:15:00 GMT 1999
>The following bug was discovered when porting a mixture of C and FORTRAN
>software from a Solaris 2 system using the Sun Workshop compilers to a Linux box
>kited out with egcs 1.0.3 release, and gcc 22.214.171.124.
Fortran I/O doesn't mix well with other I/O models, such as the C model
(even when accessed via g77's libU77). I believe the g77 docs include
some explanation of this, though perhaps they could be improved.
So, basically, you either do all your I/O (to a unit, most safely in
your entire program) via Fortran I/O -- OPEN/CLOSE/INQUIRE/READ/WRITE --
or you do it all via the underlying C I/O library, meaning open, fopen,
read, write, and so on.
Also, Fortran I/O doesn't mix well with *itself* when compiled by
different compilers into a single program, unless they're cooperating
somehow (as in the case of g77 and f2c), FWIW.
tq vm, (burley)
More information about the Gcc-bugs