As Fortran 2018 C1553, if with BIND(C), the function result shall be an
interoperable scalar variable. As Fortran 2018 18.3.4(1), the
interoperable scalar variable is not a coarray, has neither the
ALLOCATABLE nor the POINTER attribute, and if it is of type character its
length is not assumed or declared by an expression that is not a constant
expression.
As Fortran 2018 18.3.1(1), if the type is character, the length type
parameter is interoperable if and only if its value is one.
The message seems a bit complex to me. What about BIND(C) character function result must have length one ? @PeteSteinfeld for opinion.