aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/data.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2009-08-13 21:46:46 +0200
committerJanus Weil <janus@gcc.gnu.org>2009-08-13 21:46:46 +0200
commitbc21d3152f7644fcbd2acf98adbba270c0408c91 (patch)
tree7ca7b016aeb3b05df501fe81fe97a0e52abdc7b1 /gcc/fortran/data.c
parentf100a4a841e1247f0ea73c93368306fb86f12954 (diff)
downloadgcc-bc21d3152f7644fcbd2acf98adbba270c0408c91.zip
gcc-bc21d3152f7644fcbd2acf98adbba270c0408c91.tar.gz
gcc-bc21d3152f7644fcbd2acf98adbba270c0408c91.tar.bz2
re PR fortran/40941 (gfc_typespec: put derived and cl into union)
2009-08-13 Janus Weil <janus@gcc.gnu.org> PR fortran/40941 * gfortran.h (gfc_typespec): Put 'derived' and 'cl' into union. * decl.c (build_struct): Make sure 'cl' is only used if type is BT_CHARACTER. * symbol.c (gfc_set_default_type): Ditto. * resolve.c (resolve_symbol, resolve_fl_derived): Ditto. (resolve_equivalence,resolve_equivalence_derived): Make sure 'derived' is only used if type is BT_DERIVED. * trans-io.c (transfer_expr): Make sure 'derived' is only used if type is BT_DERIVED or BT_INTEGER (special case: C_PTR/C_FUNPTR). * array.c: Mechanical replacements to accomodate union in gfc_typespec. * check.c: Ditto. * data.c: Ditto. * decl.c: Ditto. * dump-parse-tree.c: Ditto. * expr.c: Ditto. * interface.c: Ditto. * iresolve.c: Ditto. * match.c: Ditto. * misc.c: Ditto. * module.c: Ditto. * openmp.c: Ditto. * parse.c: Ditto. * primary.c: Ditto. * resolve.c: Ditto. * simplify.c: Ditto. * symbol.c: Ditto. * target-memory.c: Ditto. * trans-array.c: Ditto. * trans-common.c: Ditto. * trans-const.c: Ditto. * trans-decl.c: Ditto. * trans-expr.c: Ditto. * trans-intrinsic.c: Ditto. * trans-io.c: Ditto. * trans-stmt.c: Ditto. * trans-types.c: Ditto. From-SVN: r150725
Diffstat (limited to 'gcc/fortran/data.c')
-rw-r--r--gcc/fortran/data.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fortran/data.c b/gcc/fortran/data.c
index 5829c7f..6cddb3c 100644
--- a/gcc/fortran/data.c
+++ b/gcc/fortran/data.c
@@ -154,7 +154,7 @@ create_character_intializer (gfc_expr *init, gfc_typespec *ts,
int len, start, end;
gfc_char_t *dest;
- gfc_extract_int (ts->cl->length, &len);
+ gfc_extract_int (ts->u.cl->length, &len);
if (init == NULL)
{
@@ -379,7 +379,7 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index)
/* Setup the expression to hold the constructor. */
expr->expr_type = EXPR_STRUCTURE;
expr->ts.type = BT_DERIVED;
- expr->ts.derived = ref->u.c.sym;
+ expr->ts.u.derived = ref->u.c.sym;
}
else
gcc_assert (expr->expr_type == EXPR_STRUCTURE);
@@ -417,7 +417,7 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index)
if (ref || last_ts->type == BT_CHARACTER)
{
- if (lvalue->ts.cl->length == NULL && !(ref && ref->u.ss.length != NULL))
+ if (lvalue->ts.u.cl->length == NULL && !(ref && ref->u.ss.length != NULL))
return FAILURE;
expr = create_character_intializer (init, last_ts, ref, rvalue);
}
@@ -569,7 +569,7 @@ gfc_assign_data_value_range (gfc_expr *lvalue, gfc_expr *rvalue,
/* Setup the expression to hold the constructor. */
expr->expr_type = EXPR_STRUCTURE;
expr->ts.type = BT_DERIVED;
- expr->ts.derived = ref->u.c.sym;
+ expr->ts.u.derived = ref->u.c.sym;
}
else
gcc_assert (expr->expr_type == EXPR_STRUCTURE);
@@ -716,7 +716,7 @@ formalize_structure_cons (gfc_expr *expr)
return;
head = tail = NULL;
- for (order = expr->ts.derived->components; order; order = order->next)
+ for (order = expr->ts.u.derived->components; order; order = order->next)
{
/* Find the next component. */
last = NULL;