You have not supplied a prototype in the C code for the function. Also, your subroutine on the Fortran side is not interoperable with C. It should look something like the following.
extern void test_(char* my_array, long int length);
...
char my_array[512];
...
test_(my_array,100L);