diff options
author | Mikael Morin <mikael@gcc.gnu.org> | 2010-07-10 18:14:45 +0000 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2010-07-10 18:14:45 +0000 |
commit | 35151cd5f8b9f94eee7853a25ae65df04591651a (patch) | |
tree | a703e930b2e2efed2daa3fbccfb6e75dfa38ca93 /gcc/fortran/trans-io.c | |
parent | 022e30c0b67a70587b22fc67f7a7e11e0600005f (diff) | |
download | gcc-35151cd5f8b9f94eee7853a25ae65df04591651a.zip gcc-35151cd5f8b9f94eee7853a25ae65df04591651a.tar.gz gcc-35151cd5f8b9f94eee7853a25ae65df04591651a.tar.bz2 |
trans-io.c (gfc_build_st_parameter): Update calls to gfc_add_field_to_struct.
2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
* trans-io.c (gfc_build_st_parameter): Update calls to
gfc_add_field_to_struct.
* trans-stmt.c (ADD_FIELD): Ditto.
* trans-types.c
(gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
C_ADDRESS field.
(gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
fieldlist, remove fieldlist from argument list.
(gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
and remove fieldlist from argument list.
(gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
gfc_get_mixed_entry_union): Move setting
TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
* trans-types.h (gfc_add_field_to_struct): Update prototype.
From-SVN: r162042
Diffstat (limited to 'gcc/fortran/trans-io.c')
-rw-r--r-- | gcc/fortran/trans-io.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c index 2624bb2..8626e03 100644 --- a/gcc/fortran/trans-io.c +++ b/gcc/fortran/trans-io.c @@ -176,13 +176,11 @@ gfc_build_st_parameter (enum ioparam_type ptype, tree *types) case IOPARM_type_parray: case IOPARM_type_pchar: case IOPARM_type_pad: - p->field = gfc_add_field_to_struct (&TYPE_FIELDS (t), t, - get_identifier (p->name), + p->field = gfc_add_field_to_struct (t, get_identifier (p->name), types[p->type], &chain); break; case IOPARM_type_char1: - p->field = gfc_add_field_to_struct (&TYPE_FIELDS (t), t, - get_identifier (p->name), + p->field = gfc_add_field_to_struct (t, get_identifier (p->name), pchar_type_node, &chain); /* FALLTHROUGH */ case IOPARM_type_char2: @@ -190,18 +188,16 @@ gfc_build_st_parameter (enum ioparam_type ptype, tree *types) gcc_assert (len <= sizeof (name) - sizeof ("_len")); memcpy (name, p->name, len); memcpy (name + len, "_len", sizeof ("_len")); - p->field_len = gfc_add_field_to_struct (&TYPE_FIELDS (t), t, - get_identifier (name), + p->field_len = gfc_add_field_to_struct (t, get_identifier (name), gfc_charlen_type_node, &chain); if (p->type == IOPARM_type_char2) - p->field = gfc_add_field_to_struct (&TYPE_FIELDS (t), t, - get_identifier (p->name), + p->field = gfc_add_field_to_struct (t, get_identifier (p->name), pchar_type_node, &chain); break; case IOPARM_type_common: p->field - = gfc_add_field_to_struct (&TYPE_FIELDS (t), t, + = gfc_add_field_to_struct (t, get_identifier (p->name), st_parameter[IOPARM_ptype_common].type, &chain); |