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: bug in g77


Mark D LEAIR wrote:
Hi,

It appears that g77 always converts a real function return value to double precision. The following program illustrates this:

      REAL FUNCTION FOO()
      RFROMC = 50.0
      RETURN
      END

Indeed. See the discussion around the option -fno-f2c to force g77 to give up f2c compatibility in this regard (because f2c - originally - compiled to K&R defined C, it had to treat functions returning float as functions returning double. You can override this behaviour, though. Note that you have to compile *the whole program* and all its associate libraries with this option, if you choose to use it.


URL: http://gcc.gnu.org/onlinedocs/gcc-3.4.1/g77/Code-Gen-Options.html#Code%20Gen%20Options

Hope this helps,

--
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
A maintainer of GNU Fortran 95: http://gcc.gnu.org/fortran/


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