Use gfc_add_*_component defines where appropriate

A couple of places used gfc_add_component_ref(expr, "string") instead of
the defines from gfortran.h

From-SVN: r237580
This commit is contained in:
Bernhard Reutner-Fischer 2016-06-19 12:38:16 +02:00
parent 323524d939
commit d42844f1fa
4 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,15 @@
2016-06-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
instead of gfc_add_component_ref().
(gfc_get_len_component): Call gfc_add_len_component() instead of
gfc_add_component_ref().
* trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
gfc_add_data_component() instead of gfc_add_component_ref().
* trans.c (gfc_add_finalizer_call): Call
gfc_add_final_component() and gfc_add_size_component() instead
of gfc_add_component_ref.
2016-06-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* trans-types.c (gfc_typenode_for_spec): Commentary typo fix.

View File

@ -257,7 +257,7 @@ gfc_add_class_array_ref (gfc_expr *e)
int rank = CLASS_DATA (e)->as->rank;
gfc_array_spec *as = CLASS_DATA (e)->as;
gfc_ref *ref = NULL;
gfc_add_component_ref (e, "_data");
gfc_add_data_component (e);
e->rank = rank;
for (ref = e->ref; ref; ref = ref->next)
if (!ref->next)
@ -582,7 +582,7 @@ gfc_get_len_component (gfc_expr *e)
ref = ref->next;
}
/* And replace if with a ref to the _len component. */
gfc_add_component_ref (ptr, "_len");
gfc_add_len_component (ptr);
return ptr;
}

View File

@ -7137,7 +7137,7 @@ gfc_conv_intrinsic_loc (gfc_se * se, gfc_expr * expr)
if (arg_expr->rank == 0)
{
if (arg_expr->ts.type == BT_CLASS)
gfc_add_component_ref (arg_expr, "_data");
gfc_add_data_component (arg_expr);
gfc_conv_expr_reference (se, arg_expr);
}
else

View File

@ -1148,11 +1148,11 @@ gfc_add_finalizer_call (stmtblock_t *block, gfc_expr *expr2)
final_expr = gfc_copy_expr (expr);
gfc_add_vptr_component (final_expr);
gfc_add_component_ref (final_expr, "_final");
gfc_add_final_component (final_expr);
elem_size = gfc_copy_expr (expr);
gfc_add_vptr_component (elem_size);
gfc_add_component_ref (elem_size, "_size");
gfc_add_size_component (elem_size);
}
gcc_assert (final_expr->expr_type == EXPR_VARIABLE);