aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2008-11-15 17:26:13 +0000
committerPaul Thomas <pault@gcc.gnu.org>2008-11-15 17:26:13 +0000
commit4d45d495663618e45f0a0baa481b74ee7a87a597 (patch)
treec67fa9c04b0ea7ae30aa619f3f2d9426ef7f41f9 /gcc/fortran/trans-expr.c
parent6d8f280f7a76c5b008d0109762f7fb316fc86fd3 (diff)
downloadgcc-4d45d495663618e45f0a0baa481b74ee7a87a597.zip
gcc-4d45d495663618e45f0a0baa481b74ee7a87a597.tar.gz
gcc-4d45d495663618e45f0a0baa481b74ee7a87a597.tar.bz2
re PR fortran/37926 (Program gives wrong output (connected to char len))
2008-11-15 Paul Thomas <pault@gcc.gnu.org> PR fortran/37926 * trans-expr.c (gfc_add_interface_mapping): Transfer the formal arglist and the always_explicit attribute if the dummy arg is a procedure. 2008-11-15 Paul Thomas <pault@gcc.gnu.org> PR fortran/37926 * gfortran.dg/dummy_procedure_3.f90: New test. From-SVN: r141890
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r--gcc/fortran/trans-expr.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index a3265ac..ff74928d 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -1711,6 +1711,15 @@ gfc_add_interface_mapping (gfc_interface_mapping * mapping,
new_sym->attr.flavor = sym->attr.flavor;
new_sym->attr.function = sym->attr.function;
+ /* Ensure that the interface is available and that
+ descriptors are passed for array actual arguments. */
+ if (sym->attr.flavor == FL_PROCEDURE)
+ {
+ copy_formal_args (new_sym, expr->symtree->n.sym);
+ new_sym->attr.always_explicit
+ = expr->symtree->n.sym->attr.always_explicit;
+ }
+
/* Create a fake symtree for it. */
root = NULL;
new_symtree = gfc_new_symtree (&root, sym->name);