}
}
- /* If this ia a deferred TBP with an abstract interface
- (which may of course be referenced), c->expr1 will be set. */
- if (csym && csym->attr.abstract && !c->expr1)
+ /* If this ia a deferred TBP, c->expr1 will be set. */
+ if (!c->expr1 && csym)
{
- gfc_error ("ABSTRACT INTERFACE '%s' must not be referenced at %L",
- csym->name, &c->loc);
- return FAILURE;
- }
+ if (csym->attr.abstract)
+ {
+ gfc_error ("ABSTRACT INTERFACE '%s' must not be referenced at %L",
+ csym->name, &c->loc);
+ return FAILURE;
+ }
- /* Subroutines without the RECURSIVE attribution are not allowed to
- * call themselves. */
- if (csym && is_illegal_recursion (csym, gfc_current_ns))
- {
- if (csym->attr.entry && csym->ns->entries)
- gfc_error ("ENTRY '%s' at %L cannot be called recursively, as"
- " subroutine '%s' is not RECURSIVE",
- csym->name, &c->loc, csym->ns->entries->sym->name);
- else
- gfc_error ("SUBROUTINE '%s' at %L cannot be called recursively, as it"
- " is not RECURSIVE", csym->name, &c->loc);
+ /* Subroutines without the RECURSIVE attribution are not allowed to
+ call themselves. */
+ if (is_illegal_recursion (csym, gfc_current_ns))
+ {
+ if (csym->attr.entry && csym->ns->entries)
+ gfc_error ("ENTRY '%s' at %L cannot be called recursively, "
+ "as subroutine '%s' is not RECURSIVE",
+ csym->name, &c->loc, csym->ns->entries->sym->name);
+ else
+ gfc_error ("SUBROUTINE '%s' at %L cannot be called recursively, "
+ "as it is not RECURSIVE", csym->name, &c->loc);
- t = FAILURE;
+ t = FAILURE;
+ }
}
/* Switch off assumed size checking and do this again for certain kinds