How to write a C binding to call a Fortran subroutine with character argument z1*(*)?

No, the standard currently only marks the CHARACTER*char_length form of declaration as redundant in the obsolescent features section under Appendix. Unfortunately the chances are very high the support for this form will never be deleted from the standard; also, you can be more certain the current crop of compilers will continue supporting this feature than you can be of death and taxes!

Nonetheless, CHARACTER(len=*) is the suggested form even according to the standard.

Separately I don’t think OP is interested in standard compliance. OP would do well to frame inquiries better in the original post, say along the following lines: tell me which small change can make x/y/z work using gfortran on Windows without having to use BIND(C).

1 Like