diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-05 10:32:23 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-05 10:32:23 +0000 |
commit | fe410b3e0f7de0376d98b922113c80f9ab4bd192 (patch) | |
tree | 2907bc726434f732f093ecd43d5f5ba62ac08265 /gcc/fortran/resolve.c | |
parent | 941f2a0d21995a3e06f340891a639c4462850312 (diff) | |
download | gcc-fe410b3e0f7de0376d98b922113c80f9ab4bd192.tar.gz |
2008-04-05 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r133930
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@133932 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 49 |
1 files changed, 7 insertions, 42 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 0d39b2df849..af9ef55ce41 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -2374,7 +2374,12 @@ resolve_function (gfc_expr *expr) gfc_expr_set_symbols_referenced (expr->ts.cl->length); } - if (t == SUCCESS) + if (t == SUCCESS + && !((expr->value.function.esym + && expr->value.function.esym->attr.elemental) + || + (expr->value.function.isym + && expr->value.function.isym->elemental))) find_noncopying_intrinsics (expr->value.function.esym, expr->value.function.actual); @@ -2845,7 +2850,7 @@ resolve_call (gfc_code *c) if (resolve_elemental_actual (NULL, c) == FAILURE) return FAILURE; - if (t == SUCCESS) + if (t == SUCCESS && !(c->resolved_sym && c->resolved_sym->attr.elemental)) find_noncopying_intrinsics (c->resolved_sym, c->ext.actual); return t; } @@ -4878,7 +4883,6 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn) { gfc_symbol *s = NULL; gfc_alloc *a; - bool is_variable; if (code->expr) s = code->expr->symtree->n.sym; @@ -4892,45 +4896,6 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn) if (gfc_pure (NULL) && gfc_impure_variable (s)) gfc_error ("Illegal STAT variable in %s statement at %C " "for a PURE procedure", fcn); - - is_variable = false; - if (s->attr.flavor == FL_VARIABLE) - is_variable = true; - else if (s->attr.function && s->result == s - && (gfc_current_ns->proc_name == s - || - (gfc_current_ns->parent - && gfc_current_ns->parent->proc_name == s))) - is_variable = true; - else if (gfc_current_ns->entries && s->result == s) - { - gfc_entry_list *el; - for (el = gfc_current_ns->entries; el; el = el->next) - if (el->sym == s) - { - is_variable = true; - } - } - else if (gfc_current_ns->parent && gfc_current_ns->parent->entries - && s->result == s) - { - gfc_entry_list *el; - for (el = gfc_current_ns->parent->entries; el; el = el->next) - if (el->sym == s) - { - is_variable = true; - } - } - - if (s->attr.flavor == FL_UNKNOWN - && gfc_add_flavor (&s->attr, FL_VARIABLE, - s->name, NULL) == SUCCESS) - is_variable = true; - - if (!is_variable) - gfc_error ("STAT tag in %s statement at %L must be " - "a variable", fcn, &code->expr->where); - } if (s && code->expr->ts.type != BT_INTEGER) |