pmk <
pmkla...@gmail.com> schrieb:
If you use BIND(C) in lowercase, then the name of the procedure
is the one you specified, in lowercase.
Example:
$ cat bind.f90
module x
contains
subroutine foo() bind(c)
end subroutine foo
end module x
$ gfortran -c bind.f90
$ nm bind.o
0000000000000000 T foo
$ nagfor -c bind.f90
NAG Fortran Compiler Release 7.1(Hanzomon) Build 7101
[NAG Fortran Compiler normal termination]
$ nm bind.o
0000000000000000 T foo
U _GLOBAL_OFFSET_TABLE_
0000000000000000 b __NAGf90_DefIO_3_Read
0000000000000020 b __NAGf90_DefIO_3_Write
0000000000000020 C x_
Both compilers correctly use "foo" as the binding name.
What you observed probably was the "normal" name mangling, without
bind(c). That is indeed compiler dependent.