/* F2003, C1272 (3). */
if (gfc_pure (NULL) && cons->expr->expr_type == EXPR_VARIABLE
- && (gfc_impure_variable (cons->expr->symtree->n.sym)
- || gfc_is_coindexed (cons->expr)))
+ && gfc_impure_variable (cons->expr->symtree->n.sym))
{
t = FAILURE;
- gfc_error ("Invalid expression in the derived type constructor for "
- "pointer component '%s' at %L in PURE procedure",
- comp->name, &cons->expr->where);
+ gfc_error ("Invalid expression in the derived type constructor for pointer "
+ "component '%s' at %L in PURE procedure", comp->name,
+ &cons->expr->where);
}
}
e->ts = target->n.sym->ts;
e->expr_type = EXPR_FUNCTION;
-<<<<<<< HEAD
- /* Resolution is not necessary if this is a class subroutine; this
- function only has to identify the specific proc. Resolution of
- the call will be done next in resolve_typebound_call. */
- return gfc_resolve_expr (e);
-=======
/* Resolution is not necessary when constructing component calls
for class members, since this must only be done for the
declared type, which is done afterwards. */
gfc_add_component_ref (hash_value, "$hash");
return hash_value;
->>>>>>> 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
}
/* Resolve a typebound function, or 'method'. First separate all
the non-CLASS references by calling resolve_compcall directly. */
-<<<<<<< HEAD
-=======
/* Resolve a typebound function, or 'method'. First separate all
the non-CLASS references by calling resolve_compcall directly.
Then treat the CLASS references by resolving for each of the class
members in turn. */
->>>>>>> 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
static gfc_try
resolve_typebound_function (gfc_expr* e)
{
st = e->symtree;
if (st == NULL)
-<<<<<<< HEAD
- return resolve_compcall (e, NULL);
-=======
return resolve_compcall (e, true, false);
->>>>>>> 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
/* Get the CLASS declared type. */
declared = get_declared_from_expr (&class_ref, &new_ref, e);
/* Weed out cases of the ultimate component being a derived type. */
if ((class_ref && class_ref->u.c.component->ts.type == BT_DERIVED)
-<<<<<<< HEAD
- || (!class_ref && st->n.sym->ts.type != BT_CLASS))
- {
- gfc_free_ref_list (new_ref);
- return resolve_compcall (e, NULL);
-=======
|| (!class_ref && st->n.sym->ts.type != BT_CLASS))
{
gfc_free_ref_list (new_ref);
return resolve_compcall (e, true, false);
->>>>>>> 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
}
c = gfc_find_component (declared, "$data", true, true);
resolve_compcall (e, &name);
ts = e->ts;
-<<<<<<< HEAD
- /* Then convert the expression to a procedure pointer component call. */
- e->value.function.esym = NULL;
- e->symtree = st;
-=======
class_try = (resolve_compcall (e, true, false) == SUCCESS)
? class_try : FAILURE;
->>>>>>> 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
if (class_ref)
{
return SUCCESS;
}
-<<<<<<< HEAD
-/* Resolve a typebound subroutine, or 'method'. First separate all
- the non-CLASS references by calling resolve_typebound_call
- directly. */
-=======
/* Resolve a typebound subroutine, or 'method'. First separate all
the non-CLASS references by calling resolve_typebound_call directly.
Then treat the CLASS references by resolving for each of the class
members in turn. */
->>>>>>> 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
static gfc_try
resolve_typebound_subroutine (gfc_code *code)
st = code->expr1->symtree;
if (st == NULL)
-<<<<<<< HEAD
- return resolve_typebound_call (code, NULL);
-=======
return resolve_typebound_call (code);
->>>>>>> 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
/* Get the CLASS declared type. */
declared = get_declared_from_expr (&class_ref, &new_ref, code->expr1);
/* Weed out cases of the ultimate component being a derived type. */
if ((class_ref && class_ref->u.c.component->ts.type == BT_DERIVED)
-<<<<<<< HEAD
- || (!class_ref && st->n.sym->ts.type != BT_CLASS))
-=======
|| (!class_ref && st->n.sym->ts.type != BT_CLASS))
->>>>>>> 2010-03-12 Paul Thomas <pault@gcc.gnu.org>
{
gfc_free_ref_list (new_ref);
return resolve_typebound_call (code, NULL);
&& lhs->expr_type == EXPR_VARIABLE
&& lhs->ts.u.derived->attr.pointer_comp
&& rhs->expr_type == EXPR_VARIABLE
- && (gfc_impure_variable (rhs->symtree->n.sym)
- || gfc_is_coindexed (rhs)))
- {
- /* F2008, C1283. */
- if (gfc_is_coindexed (rhs))
- gfc_error ("Coindexed expression at %L is assigned to "
- "a derived type variable with a POINTER "
- "component in a PURE procedure",
- &rhs->where);
- else
- gfc_error ("The impure variable at %L is assigned to "
- "a derived type variable with a POINTER "
- "component in a PURE procedure (12.6)",
- &rhs->where);
- return rval;
- }
-
- /* Fortran 2008, C1283. */
- if (gfc_is_coindexed (lhs))
+ && gfc_impure_variable (rhs->symtree->n.sym))
{
gfc_error ("Assignment to coindexed variable at %L in a PURE "
"procedure", &rhs->where);