https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92482
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-08-31
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
With my bind-C array descriptor patch, all tests except of
strg_print_2("abc").
(To be submitted; I will include this testcase as
gfortran.dg/bind-c-char-descr.f90
with the failing test commented.)
The still FAILING testcase does *not* use BIND(C) - and only TYPE(*) with
assumed-rank:
That test passes this string to a gfortran array descriptor for type:
type(*), target, intent(in) :: this(..)
which is then
c_f_pointer(c_loc(this), strn)
to a Fortran pointer.
The call has:
scalar.4 = 97; // that's 'a' -> expected: "abc".
desc.3.dtype = {.elem_len=1, .rank=0, .type=1}; // not the elem_len=1;
should be len*kind
desc.3.data = (void *) &scalar.4;
desc.3.span = (integer(kind=8)) desc.3.dtype.elem_len;