Commit 37ea263a by Mikael Morin

re PR fortran/49074 ([OOP] Defined assignment w/ CLASS arrays: Incomplete error message)

fortran/
	PR fortran/49074
	* trans-expr.c (gfc_conv_variable): Don't walk the reference chain.
	Handle NULL array references.
	(gfc_conv_procedure_call): Remove code handling NULL array references.

testsuite/
	PR fortran/49074
	* gfortran.dg/typebound_assignment_5.f03: New.

From-SVN: r200069
parent e5b962d0
2013-06-13 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/49074
* trans-expr.c (gfc_conv_variable): Don't walk the reference chain.
Handle NULL array references.
(gfc_conv_procedure_call): Remove code handling NULL array references.
2013-06-11 Tobias Burnus <burnus@net-b.de>
PR fortran/57535
......
......@@ -1761,9 +1761,12 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr)
/* A scalarized term. We already know the descriptor. */
se->expr = ss_info->data.array.descriptor;
se->string_length = ss_info->string_length;
for (ref = ss_info->data.array.ref; ref; ref = ref->next)
if (ref->type == REF_ARRAY && ref->u.ar.type != AR_ELEMENT)
break;
ref = ss_info->data.array.ref;
if (ref)
gcc_assert (ref->type == REF_ARRAY
&& ref->u.ar.type != AR_ELEMENT);
else
gfc_conv_tmp_array_ref (se);
}
else
{
......@@ -4041,23 +4044,11 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
gfc_init_se (&parmse, se);
parm_kind = ELEMENTAL;
if (ss->dimen > 0 && e->expr_type == EXPR_VARIABLE
&& ss->info->data.array.ref == NULL)
{
gfc_conv_tmp_array_ref (&parmse);
if (e->ts.type == BT_CHARACTER)
gfc_conv_string_parameter (&parmse);
else
parmse.expr = gfc_build_addr_expr (NULL_TREE, parmse.expr);
}
else
{
gfc_conv_expr_reference (&parmse, e);
if (e->ts.type == BT_CHARACTER && !e->rank
&& e->expr_type == EXPR_FUNCTION)
parmse.expr = build_fold_indirect_ref_loc (input_location,
parmse.expr);
}
if (fsym && fsym->ts.type == BT_DERIVED
&& gfc_is_class_container_ref (e))
......
2013-06-13 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/49074
* gfortran.dg/typebound_assignment_5.f03: New.
2013-06-13 Marc Glisse <marc.glisse@inria.fr>
* gcc.dg/tree-ssa/forwprop-27.c: New testcase.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment