This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Gnu C/Fortran bug?
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: Mehry Yazdanian <m_yazdanian at lbl dot gov>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 12 Apr 2002 21:23:00 +0200
- Subject: Re: Gnu C/Fortran bug?
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <3CB729C4.FE812A53@lbl.gov>
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)