Iso_c_binding: interface to a C function returning a string

Mh, yeah, but clearly not the case. In any case, I even tried changing the Fortran function name to be double sure, same behavior.

I am not sure if I correctly understand your message, but in any case, to be as clear as possible, within the Fortran xbsf_get_error_string function eevrything works as expected, and the allocatable result string is allocated to a non-0 length string, containing the correct message.
I think it is the immediately following result assignment which is failing to keep the constructed result dummy variable descriptor to the actual variable.

Console output:

 "GPU Offloading not supported"          28  # This is the print line in `xbsf_get_error_string`
   --[info]   ""           0    # This is a print after the function result assignment at the caller site.