Calling convention mismatch between C and Fortran also applies to function pointers passed around the different processors.
In your cmodule.h the function pointer has interface:
typedef double (*func_ptr)(double);
while your Fortran function square is the equivalent to
double (*func_ptr)(double *);
Try changing the Fortran function to accept real(real64), value :: x. This should fix the issue.