aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 3fbbf0e..9f5774b 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -1346,6 +1346,10 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping,
/* If the argument is a scalar or a pointer to an array, dereference it. */
else if (!sym->attr.dimension || sym->attr.pointer)
value = build_fold_indirect_ref (se->expr);
+
+ /* For character(*), use the actual argument's descriptor. */
+ else if (sym->ts.type == BT_CHARACTER && !new_sym->ts.cl->length)
+ value = build_fold_indirect_ref (se->expr);
/* If the argument is an array descriptor, use it to determine
information about the actual argument's shape. */