Hi there,
I have a problem with iso_c_bindings and fortran character parameters. My simple C function:
#include <stdio.h>
void testc(const char *str) {
printf("fstring : <%s>\n",str);
}
and the fortran test program:
program test
use iso_c_binding
interface
subroutine testc(name) bind(c)
use iso_c_binding
character(kind=c_char,len=*) :: name
end subroutine testc
end interface
call testc("test 1")
call testc("test 2")
end program test
When I compile above code with pgf90 8.0-6 I get the following results:
fstring : <test 1test 2>
fstring : <test 2>
Somehow the two parameter strings are not separated. Any suggestions?