aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2013-04-28 02:59:44 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2013-04-28 02:59:44 +0000
commite3d2d75c497b505bfa00c39724aad6f954fc8ee5 (patch)
tree79329e560ebec413c5e91f91cab5cc38e8d729a2 /libgfortran
parent65d2087e9886246c7bc13b8726d872df1069df0b (diff)
2013-04-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
Backport from mainline: 2013-03-25 Tilo Schwarz <tilo@tilo-schwarz.de> PR libfortran/52512 * io/list_read.c (nml_parse_qualifier): To check for a derived type don't use the namelist head element type but the current element type. (nml_get_obj_data): Add current namelist element type to nml_parse_qualifier call. PR fortran/52512 * gfortran.dg/namelist_79.f90: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@198366 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog11
-rw-r--r--libgfortran/io/list_read.c12
2 files changed, 17 insertions, 6 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 43ac164e8bc..05aaf9c29a2 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,14 @@
+2013-04-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ Backport from mainline:
+ 2013-03-25 Tilo Schwarz <tilo@tilo-schwarz.de>
+
+ PR libfortran/52512
+ * io/list_read.c (nml_parse_qualifier): To check for a derived type
+ don't use the namelist head element type but the current element type.
+ (nml_get_obj_data): Add current namelist element type to
+ nml_parse_qualifier call.
+
2013-04-02 Tobias Burnus <burnus@net-b.de>
Backport from mainline:
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index 52a9bb05c91..a192dad7f93 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -2053,8 +2053,8 @@ calls:
static try
nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad,
- array_loop_spec *ls, int rank, char *parse_err_msg,
- size_t parse_err_msg_size,
+ array_loop_spec *ls, int rank, bt nml_elem_type,
+ char *parse_err_msg, size_t parse_err_msg_size,
int *parsed_rank)
{
int dim;
@@ -2229,7 +2229,7 @@ nml_parse_qualifier (st_parameter_dt *dtp, descriptor_dimension *ad,
do not allow excess data to be processed. */
if (is_array_section == 1
|| !(compile_options.allow_std & GFC_STD_GNU)
- || dtp->u.p.ionml->type == BT_DERIVED)
+ || nml_elem_type == BT_DERIVED)
ls[dim].end = ls[dim].start;
else
dtp->u.p.expanded_read = 1;
@@ -2867,7 +2867,7 @@ get_name:
{
parsed_rank = 0;
if (nml_parse_qualifier (dtp, nl->dim, nl->ls, nl->var_rank,
- nml_err_msg, nml_err_msg_size,
+ nl->type, nml_err_msg, nml_err_msg_size,
&parsed_rank) == FAILURE)
{
char *nml_err_msg_end = strchr (nml_err_msg, '\0');
@@ -2923,8 +2923,8 @@ get_name:
descriptor_dimension chd[1] = { {1, clow, nl->string_length} };
array_loop_spec ind[1] = { {1, clow, nl->string_length, 1} };
- if (nml_parse_qualifier (dtp, chd, ind, -1, nml_err_msg,
- nml_err_msg_size, &parsed_rank)
+ if (nml_parse_qualifier (dtp, chd, ind, -1, nl->type,
+ nml_err_msg, nml_err_msg_size, &parsed_rank)
== FAILURE)
{
char *nml_err_msg_end = strchr (nml_err_msg, '\0');