------- Additional Comments From tobi at gcc dot gnu dot org 2005-02-23 20:11
-------
g77's documentation of the calling convention:
`-fno-f2c'
Do not generate code designed to be compatible with code generated
by `f2c' use the GNU calling conventions instead.
The `f2c' calling conventions require functions that return type
`REAL(KIND=1)' to actually return the C type `double', and
functions that return type `COMPLEX' to return the values via an
extra argument in the calling sequence that points to where to
store the return value. Under the GNU calling conventions, such
functions simply return their results as they would in GNU
C--`REAL(KIND=1)' functions return the C type `float', and
`COMPLEX' functions return the GNU C type `complex' (or its
`struct' equivalent).
This does not affect the generation of code that interfaces with
the `libg2c' library.
However, because the `libg2c' library uses `f2c' calling
conventions, `g77' rejects attempts to pass intrinsics implemented
by routines in this library as actual arguments when `-fno-f2c' is
used, to avoid bugs when they are actually called by code
expecting the GNU calling conventions to work.
For example, `INTRINSIC ABS;CALL FOO(ABS)' is rejected when
`-fno-f2c' is in force. (Future versions of the `g77' run-time
library might offer routines that provide GNU-callable versions of
the routines that implement the `f2c' intrinsics that may be
passed as actual arguments, so that valid programs need not be
rejected when `-fno-f2c' is used.)
*Caution:* If `-fno-f2c' is used when compiling any source file
used in a program, it must be used when compiling _all_ Fortran
source files used in that program.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20178