aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2008-11-01 22:56:27 +0100
committerJanus Weil <janus@gcc.gnu.org>2008-11-01 22:56:27 +0100
commit6f6e26a8808c73f6603b3e64e2009c1c290058d8 (patch)
treec1bb0e6b31e1bb65c54e2d2a8eeaa3fe36e87532 /gcc/fortran/expr.c
parentf18e0ca6dc275a9af20034f7970de628f8bf9b03 (diff)
downloadgcc-6f6e26a8808c73f6603b3e64e2009c1c290058d8.zip
gcc-6f6e26a8808c73f6603b3e64e2009c1c290058d8.tar.gz
gcc-6f6e26a8808c73f6603b3e64e2009c1c290058d8.tar.bz2
re PR fortran/36426 (Endless loop in gfc_apply_interface_mapping_to_expr)
2008-11-01 Janus Weil <janus@gcc.gnu.org> PR fortran/36426 * expr.c (replace_symbol): Replace all symbols which lie in the formal namespace of the interface and copy their attributes. * resolve.c (resolve_symbol): Add charlen to namespace. 2008-11-01 Janus Weil <janus@gcc.gnu.org> PR fortran/36426 * gfortran.dg/proc_decl_19.f90: New. From-SVN: r141522
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 2cebb65..ea76653 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -3511,12 +3511,11 @@ static bool
replace_symbol (gfc_expr *expr, gfc_symbol *sym, int *i ATTRIBUTE_UNUSED)
{
if ((expr->expr_type == EXPR_VARIABLE || expr->expr_type == EXPR_FUNCTION)
- && expr->symtree->n.sym->ns != sym->formal_ns
- && expr->symtree->n.sym->attr.dummy)
+ && expr->symtree->n.sym->ns == sym->ts.interface->formal_ns)
{
gfc_symtree *stree;
gfc_get_sym_tree (expr->symtree->name, sym->formal_ns, &stree);
- stree->n.sym->attr.referenced = expr->symtree->n.sym->attr.referenced;
+ stree->n.sym->attr = expr->symtree->n.sym->attr;
expr->symtree = stree;
}
return false;