------- Comment #8 from burnus at gcc dot gnu dot org 2010-09-01 12:01 ------- (In reply to comment #0) > Main program is written in C. (see the following)
I strongly suggest using the C Binding facility of Fortran 2003 instead of relying on the internals of a given compiler. GCC/gfortran supports the C binding since 4.3.0 and newer version of most other compilers support it as well. Cf. http://gcc.gnu.org/onlinedocs/gfortran/Interoperability-with-C.html The article at http://www.fortranplus.co.uk/resource/fortran_2003_2008_compiler_support.pdf lists for some compilers the support of Fortran 2003 (and 2008) features; interesting for you are the items "Interoperability with C". Note: The list is incomplete as not all vendors have submitted their data. Regarding GCC/gfortran 4.1: I have no idea why it worked for you, but the calling convention of 4.1 was the same (I just checked). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45466