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: FORTRAN tty input/output bug


>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 2.7.2.3.

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)


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