&& sym->ns->proc_name->attr.flavor != FL_MODULE)
{
if (!gfc_notify_std (GFC_STD_F2008, "Internal procedure '%s' is"
- " used as actual argument at %L",
+ " used as actual argument at %L",
sym->name, &e->where))
goto cleanup;
}
if (!gfc_compare_interfaces (sym, def_sym, sym->name, 0, 1,
reason, sizeof(reason), NULL, NULL))
- {
+ {
gfc_error ("Interface mismatch in global procedure '%s' at %L: %s ",
sym->name, &sym->declared_at, reason);
goto done;
if (sym->attr.if_source != IFSRC_IFBODY)
gfc_procedure_use (def_sym, actual, where);
}
-
+
done:
gfc_errors_to_warnings (0);
if (intr)
{
- if (!gfc_convert_to_structure_constructor (expr, intr->sym, NULL,
+ if (!gfc_convert_to_structure_constructor (expr, intr->sym, NULL,
NULL, false))
return false;
return resolve_structure_cons (expr, 0);
no_formal_args = sym && is_external_proc (sym)
&& gfc_sym_get_dummy_args (sym) == NULL;
- if (!resolve_actual_arglist (expr->value.function.actual,
+ if (!resolve_actual_arglist (expr->value.function.actual,
p, no_formal_args))
{
inquiry_argument = false;
}
if (index->ts.type == BT_REAL)
- if (!gfc_notify_std (GFC_STD_LEGACY, "REAL array index at %L",
+ if (!gfc_notify_std (GFC_STD_LEGACY, "REAL array index at %L",
&index->where))
return false;
/* Get the CLASS declared type. */
declared = get_declared_from_expr (&class_ref, &new_ref, e, true);
-
+
if (!resolve_fl_derived (declared))
return false;
c->ext.actual = c->expr1->value.compcall.actual;
- if (!resolve_actual_arglist (c->ext.actual, comp->attr.proc,
- !(comp->ts.interface
+ if (!resolve_actual_arglist (c->ext.actual, comp->attr.proc,
+ !(comp->ts.interface
&& comp->ts.interface->formal)))
return false;
if (!resolve_ref (e))
return false;
- if (!resolve_actual_arglist (e->value.function.actual, comp->attr.proc,
- !(comp->ts.interface
+ if (!resolve_actual_arglist (e->value.function.actual, comp->attr.proc,
+ !(comp->ts.interface
&& comp->ts.interface->formal)))
return false;
if (!gfc_resolve_iterator_expr (iter->var, real_ok, "Loop variable"))
return false;
- if (!gfc_check_vardef_context (iter->var, false, false, own_scope,
+ if (!gfc_check_vardef_context (iter->var, false, false, own_scope,
_("iterator variable")))
return false;
- if (!gfc_resolve_iterator_expr (iter->start, real_ok,
+ if (!gfc_resolve_iterator_expr (iter->start, real_ok,
"Start expression in DO loop"))
return false;
- if (!gfc_resolve_iterator_expr (iter->end, real_ok,
+ if (!gfc_resolve_iterator_expr (iter->end, real_ok,
"End expression in DO loop"))
return false;
- if (!gfc_resolve_iterator_expr (iter->step, real_ok,
+ if (!gfc_resolve_iterator_expr (iter->step, real_ok,
"Step expression in DO loop"))
return false;
}
if (pointer
- && !gfc_check_vardef_context (e, true, true, false,
+ && !gfc_check_vardef_context (e, true, true, false,
_("DEALLOCATE object")))
return false;
- if (!gfc_check_vardef_context (e, false, true, false,
+ if (!gfc_check_vardef_context (e, false, true, false,
_("DEALLOCATE object")))
return false;
e2 = remove_last_array_ref (e);
t = true;
if (t && pointer)
- t = gfc_check_vardef_context (e2, true, true, false,
+ t = gfc_check_vardef_context (e2, true, true, false,
_("ALLOCATE object"));
if (t)
- t = gfc_check_vardef_context (e2, false, true, false,
+ t = gfc_check_vardef_context (e2, false, true, false,
_("ALLOCATE object"));
gfc_free_expr (e2);
if (!t)
/* Check the stat variable. */
if (stat)
{
- gfc_check_vardef_context (stat, false, false, false,
+ gfc_check_vardef_context (stat, false, false, false,
_("STAT variable"));
if ((stat->ts.type != BT_INTEGER
code->ext.dt may be NULL if the TRANSFER is related to
an INQUIRE statement -- but in this case, we are not reading, either. */
if (code->ext.dt && code->ext.dt->dt_io_kind->value.iokind == M_READ
- && !gfc_check_vardef_context (exp, false, false, false,
+ && !gfc_check_vardef_context (exp, false, false, false,
_("item in READ")))
return;
&code->expr2->where);
if (code->expr2
- && !gfc_check_vardef_context (code->expr2, false, false, false,
+ && !gfc_check_vardef_context (code->expr2, false, false, false,
_("STAT variable")))
return;
&code->expr3->where);
if (code->expr3
- && !gfc_check_vardef_context (code->expr3, false, false, false,
+ && !gfc_check_vardef_context (code->expr3, false, false, false,
_("ERRMSG variable")))
return;
"variable", &code->expr4->where);
if (code->expr4
- && !gfc_check_vardef_context (code->expr4, false, false, false,
+ && !gfc_check_vardef_context (code->expr4, false, false, false,
_("ACQUIRED_LOCK variable")))
return;
}
if (rhs->is_boz
&& !gfc_notify_std (GFC_STD_GNU, "BOZ literal at %L outside "
- "a DATA statement and outside INT/REAL/DBLE/CMPLX",
+ "a DATA statement and outside INT/REAL/DBLE/CMPLX",
&code->loc))
return false;
gfc_check_assign (lhs, rhs, 1);
+ /* Assign the 'data' of a class object to a derived type. */
+ if (lhs->ts.type == BT_DERIVED
+ && rhs->ts.type == BT_CLASS)
+ gfc_add_data_component (rhs);
+
/* Insert a GFC_ISYM_CAF_SEND intrinsic, when the LHS is a coindexed variable.
Additionally, insert this code when the RHS is a CAF as we then use the
GFC_ISYM_CAF_SEND intrinsic just to avoid a temporary; but do not do so if
&& code->expr1->value.function.isym->id == GFC_ISYM_CAF_GET)
remove_caf_get_intrinsic (code->expr1);
- if (!gfc_check_vardef_context (code->expr1, false, false, false,
+ if (!gfc_check_vardef_context (code->expr1, false, false, false,
_("assignment")))
break;
return false;
}
else if (!gfc_notify_std (GFC_STD_F2003, "Scalar object "
- "'%s' at %L may not be ALLOCATABLE",
+ "'%s' at %L may not be ALLOCATABLE",
sym->name, &sym->declared_at))
return false;
}
&& !gfc_check_symbol_access (arg->sym->ts.u.derived)
&& !gfc_notify_std (GFC_STD_F2003, "'%s' is of a PRIVATE type "
"and cannot be a dummy argument"
- " of '%s', which is PUBLIC at %L",
- arg->sym->name, sym->name,
+ " of '%s', which is PUBLIC at %L",
+ arg->sym->name, sym->name,
&sym->declared_at))
{
/* Stop this message from recurring. */
&& !gfc_notify_std (GFC_STD_F2003, "Procedure '%s' in "
"PUBLIC interface '%s' at %L "
"takes dummy arguments of '%s' which "
- "is PRIVATE", iface->sym->name,
- sym->name, &iface->sym->declared_at,
+ "is PRIVATE", iface->sym->name,
+ sym->name, &iface->sym->declared_at,
gfc_typename(&arg->sym->ts)))
{
/* Stop this message from recurring. */
gfc_formal_arglist *curr_arg;
int has_non_interop_arg = 0;
- if (!verify_bind_c_sym (sym, &(sym->ts), sym->attr.in_common,
+ if (!verify_bind_c_sym (sym, &(sym->ts), sym->attr.in_common,
sym->common_block))
{
/* Clear these to prevent looking at them again if there was an
for (op = 0; op != GFC_INTRINSIC_OPS; ++op)
{
gfc_typebound_proc* p = derived->f2k_derived->tb_op[op];
- if (p && !resolve_typebound_intrinsic_op (derived,
+ if (p && !resolve_typebound_intrinsic_op (derived,
(gfc_intrinsic_op)op, p))
resolve_bindings_result = false;
}
&& !gfc_check_symbol_access (c->ts.u.derived)
&& !gfc_notify_std (GFC_STD_F2003, "the component '%s' is a "
"PRIVATE type and cannot be a component of "
- "'%s', which is PUBLIC at %L", c->name,
+ "'%s', which is PUBLIC at %L", c->name,
sym->name, &sym->declared_at))
return false;
&& sym != c->ts.u.derived)
add_dt_to_dt_list (c->ts.u.derived);
- if (!gfc_resolve_array_spec (c->as,
- !(c->attr.pointer || c->attr.proc_pointer
+ if (!gfc_resolve_array_spec (c->as,
+ !(c->attr.pointer || c->attr.proc_pointer
|| c->attr.allocatable)))
return false;
|| gen_dt->generic->sym->module != gen_dt->generic->next->sym->module)
&& !gfc_notify_std (GFC_STD_F2003, "Generic name '%s' of function "
"'%s' at %L being the same name as derived "
- "type at %L", sym->name,
- gen_dt->generic->sym == sym
- ? gen_dt->generic->next->sym->name
- : gen_dt->generic->sym->name,
- gen_dt->generic->sym == sym
- ? &gen_dt->generic->next->sym->declared_at
- : &gen_dt->generic->sym->declared_at,
+ "type at %L", sym->name,
+ gen_dt->generic->sym == sym
+ ? gen_dt->generic->next->sym->name
+ : gen_dt->generic->sym->name,
+ gen_dt->generic->sym == sym
+ ? &gen_dt->generic->next->sym->declared_at
+ : &gen_dt->generic->sym->declared_at,
&sym->declared_at))
return false;
if (nl->sym->as && nl->sym->as->type == AS_ASSUMED_SHAPE
&& !gfc_notify_std (GFC_STD_F2003, "NAMELIST array object '%s' "
- "with assumed shape in namelist '%s' at %L",
+ "with assumed shape in namelist '%s' at %L",
nl->sym->name, sym->name, &sym->declared_at))
return false;
if (is_non_constant_shape_array (nl->sym)
&& !gfc_notify_std (GFC_STD_F2003, "NAMELIST array object '%s' "
- "with nonconstant shape in namelist '%s' at %L",
+ "with nonconstant shape in namelist '%s' at %L",
nl->sym->name, sym->name, &sym->declared_at))
return false;
|| !gfc_is_constant_expr (nl->sym->ts.u.cl->length))
&& !gfc_notify_std (GFC_STD_F2003, "NAMELIST object '%s' with "
"nonconstant character length in "
- "namelist '%s' at %L", nl->sym->name,
+ "namelist '%s' at %L", nl->sym->name,
sym->name, &sym->declared_at))
return false;
{
if (!gfc_notify_std (GFC_STD_F2003, "NAMELIST object '%s' in "
"namelist '%s' at %L with ALLOCATABLE "
- "or POINTER components", nl->sym->name,
+ "or POINTER components", nl->sym->name,
sym->name, &sym->declared_at))
return false;
&& gfc_check_symbol_access (sym)
&& !gfc_check_symbol_access (sym->ts.u.derived)
&& !gfc_notify_std (GFC_STD_F2003, "PUBLIC %s '%s' at %L of PRIVATE "
- "derived type '%s'",
- (sym->attr.flavor == FL_PARAMETER)
- ? "parameter" : "variable",
- sym->name, &sym->declared_at,
+ "derived type '%s'",
+ (sym->attr.flavor == FL_PARAMETER)
+ ? "parameter" : "variable",
+ sym->name, &sym->declared_at,
sym->ts.u.derived->name))
return;
if (!gfc_logical_kinds[i].c_bool && sym->attr.dummy
&& !gfc_notify_std (GFC_STD_GNU, "LOGICAL dummy argument '%s' at "
"%L with non-C_Bool kind in BIND(C) procedure "
- "'%s'", sym->name, &sym->declared_at,
+ "'%s'", sym->name, &sym->declared_at,
sym->ns->proc_name->name))
return;
else if (!gfc_logical_kinds[i].c_bool
&& !gfc_notify_std (GFC_STD_GNU, "LOGICAL result variable "
"'%s' at %L with non-C_Bool kind in "
- "BIND(C) procedure '%s'", sym->name,
- &sym->declared_at,
- sym->attr.function ? sym->name
+ "BIND(C) procedure '%s'", sym->name,
+ &sym->declared_at,
+ sym->attr.function ? sym->name
: sym->ns->proc_name->name))
return;
}
unsigned letter;
for (letter = 0; letter != GFC_LETTERS; ++letter)
if (ns->set_flag[letter]
- && !resolve_typespec_used (&ns->default_type[letter],
+ && !resolve_typespec_used (&ns->default_type[letter],
&ns->implicit_loc[letter], NULL))
return;
}