subroutine foo1(s) character*(*), intent(out) :: s !f2py character(f2py_len=12) s s = "123456789A12" end subroutine foo1