Erroneous results in array returned from fortran subroutine

FYI, relevant discussion: Iso_c_binding: pass an array from c to fortran (Edit: python interop content) - #10 by eelis