[SciPy-user] compiler optimization bug -fno-f2c

Stephen Walton stephen.walton at csun.edu
Fri Feb 4 13:27:24 EST 2005


Nils Wagner wrote:
Hello, Nils,

> Is it a well-known compiler optimization bug (-fno-f2c) ?

It is not a bug per se.  From man g77:

           The f2c calling conventions require functions that return type
           "REAL(KIND=1)" to actually return the C type "double", and func-
           tions 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 "COM-
           PLEX" functions return the GNU C type "complex" (or its "struct"
           equivalent).

Ideally, both in terms of time and storage, all code would be compiled 
with -no-f2c.  But as the man page says later on, all Fortran source 
code in a program must be compiled with this switch if any of it is.




More information about the SciPy-User mailing list