aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 382d1fe..75f27be 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -676,36 +676,6 @@ gfc_has_vector_index (gfc_expr *e)
}
-/* Insert a reference to the component of the given name.
- Only to be used with CLASS containers. */
-
-void
-gfc_add_component_ref (gfc_expr *e, const char *name)
-{
- gfc_ref **tail = &(e->ref);
- gfc_ref *next = NULL;
- gfc_symbol *derived = e->symtree->n.sym->ts.u.derived;
- while (*tail != NULL)
- {
- if ((*tail)->type == REF_COMPONENT)
- derived = (*tail)->u.c.component->ts.u.derived;
- if ((*tail)->type == REF_ARRAY && (*tail)->next == NULL)
- break;
- tail = &((*tail)->next);
- }
- if (*tail != NULL && strcmp (name, "$data") == 0)
- next = *tail;
- (*tail) = gfc_get_ref();
- (*tail)->next = next;
- (*tail)->type = REF_COMPONENT;
- (*tail)->u.c.sym = derived;
- (*tail)->u.c.component = gfc_find_component (derived, name, true, true);
- gcc_assert((*tail)->u.c.component);
- if (!next)
- e->ts = (*tail)->u.c.component->ts;
-}
-
-
/* Copy a shape array. */
mpz_t *
@@ -3628,32 +3598,6 @@ gfc_default_initializer (gfc_typespec *ts)
}
-/* Build a NULL initializer for CLASS pointers,
- initializing the $data and $vptr components to zero. */
-
-gfc_expr *
-gfc_class_null_initializer (gfc_typespec *ts)
-{
- gfc_expr *init;
- gfc_component *comp;
-
- init = gfc_get_structure_constructor_expr (ts->type, ts->kind,
- &ts->u.derived->declared_at);
- init->ts = *ts;
-
- for (comp = ts->u.derived->components; comp; comp = comp->next)
- {
- gfc_constructor *ctor = gfc_constructor_get();
- ctor->expr = gfc_get_expr ();
- ctor->expr->expr_type = EXPR_NULL;
- ctor->expr->ts = comp->ts;
- gfc_constructor_append (&init->value.constructor, ctor);
- }
-
- return init;
-}
-
-
/* Given a symbol, create an expression node with that symbol as a
variable. If the symbol is array valued, setup a reference of the
whole array. */