示例#1
0
int
gfc_check_fncall_dependency (gfc_expr *other, sym_intent intent,
			     gfc_symbol *fnsym, gfc_actual_arglist *actual,
			     gfc_dep_check elemental)
{
  gfc_formal_arglist *formal;
  gfc_expr *expr;

  formal = fnsym ? fnsym->formal : NULL;
  for (; actual; actual = actual->next, formal = formal ? formal->next : NULL)
    {
      expr = actual->expr;

      /* Skip args which are not present.  */
      if (!expr)
	continue;

      /* Skip other itself.  */
      if (expr == other)
	continue;

      /* Skip intent(in) arguments if OTHER itself is intent(in).  */
      if (formal && intent == INTENT_IN
	  && formal->sym->attr.intent == INTENT_IN)
	continue;

      if (gfc_check_argument_dependency (other, intent, expr, elemental))
	return 1;
    }

  return 0;
}
示例#2
0
static int
gfc_check_argument_dependency (gfc_expr * other, sym_intent intent,
			       gfc_expr * expr)
{
  switch (other->expr_type)
    {
    case EXPR_VARIABLE:
      return gfc_check_argument_var_dependency (other, intent, expr);

    case EXPR_FUNCTION:
      if (other->inline_noncopying_intrinsic)
	{
	  other = gfc_get_noncopying_intrinsic_argument (other);
	  return gfc_check_argument_dependency (other, INTENT_IN, expr);
	}
      return 0;

    default:
      return 0;
    }
}