I am not sure if function result can somehow be a pointer or not, but I know that if one passes an array pointer from c, it can then be accessed from fortran side. That is how I did it when communicating between Python-Fortran. (I had to use c_ptr
type and intrinsic subroutine c_f_pointer
on Fortran side)
Edit. Sorry, I realize now that I didn’t read your post well and I see that I didn’t answer to your question repeated what you already know.