aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 0d39b2d..41b1add 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -4878,7 +4878,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 +4891,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)