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

--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
In trans-expr.c's gfc_get_interface_mapping_array(), we have:
3870      type = gfc_typenode_for_spec (&sym->ts);

Unfortunately, in the failing case, one has:
  sym->ts.u.cl.backend_decl == NULL_TREE
while in the working case, it's an INTEGER_CST with value one.

In trans-decl.c's gfc_get_symbol_decl one calls:
          if (sym->ts.u.cl->backend_decl == NULL_TREE)
            length = gfc_create_string_length (sym);
which also sets the backend_decl. However, we cannot directly call it as it
operates on a "sym" and not on a "ts". [The symbol/module name for mangling the
name.]

Reply via email to