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]
Other format: [Raw text]

Re: Gnu C/Fortran bug?


Mehry Yazdanian wrote:

> I have a simple program which works fine under Solaris/unix but does not
> work correctly under Linux.

> I have a fortran 3 line program which calls a C routine which reads from
> stdin using fgets and then echoes back what is typed, using fputs. That
> works ok but when it returns from the c call in fortran, it should type
> on the screen "Returned From Subroutine". But instead it types "Returned
> from Subroutine", when it is waiting for the user to type the line.

Note that the way to combine Fortran and C code in one executable is
compiler-dependent and should be documented in the compiler manual.

Apparently, this works differently for g77 and gcc than for the Solaris
compilers.

For g77/gcc, see the Fortran manual, chapter 12:

	http://gcc.gnu.org/onlinedocs/gcc-3.0.4/g77_16.html#SEC551

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


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