diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-26 19:05:08 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-26 19:05:08 +0000 |
commit | 58c5f008ca19c1255dacf9ccd88f5eee28d00a5d (patch) | |
tree | db30d851481038a71124decce133cf0cb5e3baeb /libgfortran | |
parent | 7a1230f71b9ab10ae34001766ec5d20e9d5e2bc6 (diff) | |
download | gcc-58c5f008ca19c1255dacf9ccd88f5eee28d00a5d.tar.gz |
2010-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/46010
* io/list_read.c (nml_parse_qualifier): Add additional conditions for
setting the end index for loop specification. Fix some whitespace.
* io/write.c (write_default_char4): Const-ify the source argument.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165979 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/io/list_read.c | 10 | ||||
-rw-r--r-- | libgfortran/io/write.c | 2 |
3 files changed, 14 insertions, 5 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 5b06cef1b4f..d5e047e2f65 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2010-10-26 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR libgfortran/46010 + * io/list_read.c (nml_parse_qualifier): Add additional conditions for + setting the end index for loop specification. Fix some whitespace. + * io/write.c (write_default_char4): Const-ify the source argument. + 2010-10-21 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/46007 diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 113b469bfce..7fa57f59c00 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -2105,8 +2105,10 @@ nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad, /* If -std=f95/2003 or an array section is specified, do not allow excess data to be processed. */ - if (is_array_section == 1 - || !(compile_options.allow_std & GFC_STD_GNU)) + if (is_array_section == 1 + || !(compile_options.allow_std & GFC_STD_GNU) + || !dtp->u.p.ionml->touched + || dtp->u.p.ionml->type == BT_DERIVED) ls[dim].end = ls[dim].start; else dtp->u.p.expanded_read = 1; @@ -2121,12 +2123,12 @@ nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad, } if (is_array_section == 1 && dtp->u.p.expanded_read == 1) - { + { int i; dtp->u.p.expanded_read = 0; for (i = 0; i < dim; i++) ls[i].end = ls[i].start; - } + } /* Check the values of the triplet indices. */ if ((ls[dim].start > (ssize_t) GFC_DIMENSION_UBOUND(ad[dim])) diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c index 0a6aee1588e..5afbbd529fc 100644 --- a/libgfortran/io/write.c +++ b/libgfortran/io/write.c @@ -65,7 +65,7 @@ memcpy4 (gfc_char4_t *dest, const char *source, int k) /* Write out default char4. */ static void -write_default_char4 (st_parameter_dt *dtp, gfc_char4_t *source, +write_default_char4 (st_parameter_dt *dtp, const gfc_char4_t *source, int src_len, int w_len) { char *p; |