diff options
Diffstat (limited to 'libgfortran/io')
-rw-r--r-- | libgfortran/io/format.c | 5 | ||||
-rw-r--r-- | libgfortran/io/list_read.c | 4 | ||||
-rw-r--r-- | libgfortran/io/write.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index b718faa..b4920aa 100644 --- a/libgfortran/io/format.c +++ b/libgfortran/io/format.c @@ -1024,8 +1024,9 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd) t = format_lex (fmt); - /* Initialize the vlist to a zero size array. */ - tail->u.udf.vlist= xmalloc (sizeof(gfc_array_i4)); + /* Initialize the vlist to a zero size, rank-one array. */ + tail->u.udf.vlist= xmalloc (sizeof(gfc_array_i4) + + sizeof (descriptor_dimension)); GFC_DESCRIPTOR_DATA(tail->u.udf.vlist) = NULL; GFC_DIMENSION_SET(tail->u.udf.vlist->dim[0],1, 0, 0); diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index fbd7dc2..d052d1f 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -2198,7 +2198,7 @@ list_formatted_read_scalar (st_parameter_dt *dtp, bt type, void *p, gfc_charlen_type child_iomsg_len; int noiostat; int *child_iostat = NULL; - gfc_array_i4 vlist; + gfc_full_array_i4 vlist; GFC_DESCRIPTOR_DATA(&vlist) = NULL; GFC_DIMENSION_SET(vlist.dim[0],1, 0, 0); @@ -2996,7 +2996,7 @@ nml_read_obj (st_parameter_dt *dtp, namelist_info *nl, index_type offset, gfc_charlen_type child_iomsg_len; int noiostat; int *child_iostat = NULL; - gfc_array_i4 vlist; + gfc_full_array_i4 vlist; formatted_dtio dtio_ptr = (formatted_dtio)nl->dtio_sub; GFC_DESCRIPTOR_DATA(&vlist) = NULL; diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index 28ea852..50ea133 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -1886,7 +1886,7 @@ list_formatted_write_scalar (st_parameter_dt *dtp, bt type, void *p, int kind, gfc_charlen_type child_iomsg_len; int noiostat; int *child_iostat = NULL; - gfc_array_i4 vlist; + gfc_full_array_i4 vlist; GFC_DESCRIPTOR_DATA(&vlist) = NULL; GFC_DIMENSION_SET(vlist.dim[0],1, 0, 0); @@ -2211,7 +2211,7 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info *obj, index_type offset, gfc_charlen_type child_iomsg_len; int noiostat; int *child_iostat = NULL; - gfc_array_i4 vlist; + gfc_full_array_i4 vlist; formatted_dtio dtio_ptr = (formatted_dtio)obj->dtio_sub; GFC_DIMENSION_SET(vlist.dim[0],1, 0, 0); |