https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92482

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The BIND(C) issue is fixed - but I keep this PR open as there is still an issue
with the non-bind(C) part. Namely:

   testsuite/gfortran.dg/bind-c-char-descr.f90

fails for:

...
  subroutine strg_print_2(this, xfail)
    if(associated(strn))then
      if (len (strn) /= 3) stop 31
      if (strn /= "abc") then
        if (present (xfail)) then
          print *, 'INVALID STRING - EXPECTED "abc" / PR47225' ! <<< PR is
wrong :-/
        else
          stop 32
        end if

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;

Reply via email to