summaryrefslogtreecommitdiffstats
path: root/libgfortran
diff options
context:
space:
mode:
authortiloschwarz <tiloschwarz@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-25 20:11:20 +0000
committertiloschwarz <tiloschwarz@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-25 20:11:20 +0000
commitc4a0180abebab097cc7916500bf41386021d4849 (patch)
treebad93b9648ef2b28d85f31cf7a6dd10c53a76fe9 /libgfortran
parent5aa2495016c0a818687c144034572fe29406cd72 (diff)
downloadppe42-gcc-c4a0180abebab097cc7916500bf41386021d4849.tar.gz
ppe42-gcc-c4a0180abebab097cc7916500bf41386021d4849.zip
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-03-25 Tilo Schwarz <tilo@tilo-schwarz.de> PR libfortran/52512 * gfortran.dg/namelist_79.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197061 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog8
-rw-r--r--libgfortran/io/list_read.c12
2 files changed, 14 insertions, 6 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 865725fbffa..61c9fd10c63 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,11 @@
+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-03-24 Tobias Burnus <burnus@net-b.de>
PR fortran/56696
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index e7ae98fcf28..ec455700268 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -2053,8 +2053,8 @@ calls:
static bool
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;
@@ -2866,7 +2866,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))
{
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))
{
char *nml_err_msg_end = strchr (nml_err_msg, '\0');
snprintf (nml_err_msg_end,
OpenPOWER on IntegriCloud