[Bug fortran/95868] Derived-type deferred-length character component handling broken

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 28 10:14:45 GMT 2022


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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
I additionally observe the following:

 <component_ref 0x7ffff71c2150
    type <pointer_type 0x7ffff71bb2a0
        type <array_type 0x7ffff71bb1f8 type <integer_type 0x7ffff6fe1348
character(kind=1)>
            string-flag BLK
            size <integer_cst 0x7ffff6fc9c78 constant 0>

That makes it difficult to check the length later on during ME processing. In
my case, for lang hooks in trans-openmp.c for mapping
  omp target map(var)
where var is allocatable and var%string is a deferred-length allocatable.

EXPECTED:
* the field's  GFC_DECL_STRING_LEN points for 'var%string' to the
_string_length component.
* TODO: Check whether the debug info is correctly set for those.


More information about the Gcc-bugs mailing list