diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2018-02-12 19:53:17 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2018-02-12 19:53:17 +0000 |
commit | e9bfdf18cb4f6fd6d323bc1a9008d2e717670ff7 (patch) | |
tree | 02ed85c48bc8966ec79c5aace72da2283178c8e6 /libgfortran/io | |
parent | 52eb4ab4092228369cea5d7ca2717d32cc666c5c (diff) | |
download | gcc-e9bfdf18cb4f6fd6d323bc1a9008d2e717670ff7.zip gcc-e9bfdf18cb4f6fd6d323bc1a9008d2e717670ff7.tar.gz gcc-e9bfdf18cb4f6fd6d323bc1a9008d2e717670ff7.tar.bz2 |
libgfortran.h (GFC_ARRAY_DESCRIPTOR): Remove dimension of descriptor to use vaiable members for dim.
2018-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
* libgfortran.h (GFC_ARRAY_DESCRIPTOR): Remove dimension
of descriptor to use vaiable members for dim.
Change usage of GFC_ARRAY_DESCRIPTOR accordingly.
(GFC_FILL_ARRAY_DESCRIPTOR): New macro.
(gfc_full_array_i4): New type.
* intrinsics/date_and_time.c (secnds): Use sizeof
(gfc_array_i4) + sizeof (descriptor_dimension) for memory
allocation.
* intrinsics/reshape_generic.c: Use GFC_FULL_ARRAY_DESCRIPTOR.
* io/format.c: Use sizeof (gfc_array_i4) + sizeof
(descriptor_dimension) for memoy allocation.
* io/list_read.c (list_formatted_read_scalar): Use
gfc_full_array_i4 for variable.
(nml_read_obj): Likewise.
* io/write.c (list_formatted_write_scalar): Likewise.
(nml_write_obj): Likewise.
* m4/reshape.m4: Use GFC_FULL_ARRAY_DESCRIPTOR.
* generated/reshape_c10.c: Regenerated.
* generated/reshape_c16.c: Regenerated.
* generated/reshape_c4.c: Regenerated.
* generated/reshape_c8.c: Regenerated.
* generated/reshape_i16.c: Regenerated.
* generated/reshape_i4.c: Regenerated.
* generated/reshape_i8.c: Regenerated.
* generated/reshape_r10.c: Regenerated.
* generated/reshape_r16.c: Regenerated.
* generated/reshape_r4.c: Regenerated.
* generated/reshape_r8.c: Regenerated.
From-SVN: r257601
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); |