http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46020
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-10-14
17:14:45 UTC ---
Thinking of it again, one probably needs also NAGs error message as:
FUNCTION F_X(A) bind(c,name='F_X')
CHARACTER*(*) F_X
END FUNCTION
...
interface
FUNCTION F_X(A) bind(c,name='F_X')
CHARACTER*(1) F_X
END FUNCTION
end interface
is also invalid - even though the effective string length is one;
F2008 has: "If the type is character, the length type parameter is
interoperable if and only if its value is one." [...]
[only interoperable] "if it is of type character its length is not assumed or
declared by an expression that is not a constant expression."
Thus, one could think of handling the assumed length case explicitly. Or one
uses, e.g.
Error: Return type of BIND(C) function 'f_x' at (1) of character type must have
length 1