diff options
author | Wolfgang Gellerich <gellerich@de.ibm.com> | 2006-09-13 12:36:26 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@gcc.gnu.org> | 2006-09-13 12:36:26 +0000 |
commit | 95cb77e64faa8e0a5852b947d29681809ad695ab (patch) | |
tree | b2d3bd0f0c0d404c8b10af894fc93d03a1bafc08 /gcc | |
parent | fcc42bcad4fac328cb9696186c30012e2454c3e2 (diff) | |
download | gcc-95cb77e64faa8e0a5852b947d29681809ad695ab.zip gcc-95cb77e64faa8e0a5852b947d29681809ad695ab.tar.gz gcc-95cb77e64faa8e0a5852b947d29681809ad695ab.tar.bz2 |
trans-expr.c (gfc_add_interface_mapping): For characters, dereference pointer if necessary and then perform the cast.
2006-09-13 Wolfgang Gellerich <gellerich@de.ibm.com>
* trans-expr.c (gfc_add_interface_mapping): For characters, dereference
pointer if necessary and then perform the cast.
From-SVN: r116921
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-expr.c | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 54db200..2e88fbf 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2006-09-13 Wolfgang Gellerich <gellerich@de.ibm.com> + + * trans-expr.c (gfc_add_interface_mapping): For characters, dereference + pointer if necessary and then perform the cast. + 2006-09-11 Steven G. Kargl <kargl@gcc.gnu.org> * intrinsic.c: Update Copyright date. diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index dc5ac27..e477f9c 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1386,11 +1386,10 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping, tmp = gfc_get_character_type_len (sym->ts.kind, NULL); tmp = build_pointer_type (tmp); if (sym->attr.pointer) - tmp = build_pointer_type (tmp); - - value = fold_convert (tmp, se->expr); - if (sym->attr.pointer) - value = build_fold_indirect_ref (value); + value = build_fold_indirect_ref (se->expr); + else + value = se->expr; + value = fold_convert (tmp, value); } /* If the argument is a scalar, a pointer to an array or an allocatable, |