Commit 951b8fbe by Jerry DeLisle

re PR fortran/41192 (NAMELIST input with just a comment ("&NAME ! comment \") fails)

2009-09-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/41192
	* io/list_read.c (eat_line): Enable eat_line to function on
	internal units.

	PR libgfortran/41219
	* io/list_read.c (nml_read_obj): Replace GFC_DTYPE_UNKNOWN with
	BT_NULL to get rid of warning.

From-SVN: r151495
parent 21a4564b
2009-09-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/41192
* io/list_read.c (eat_line): Enable eat_line to function on
internal units.
PR libgfortran/41219
* io/list_read.c (nml_read_obj): Replace GFC_DTYPE_UNKNOWN with
BT_NULL to get rid of warning.
2009-09-04 Tobias Burnus <burnus@net-b.de> 2009-09-04 Tobias Burnus <burnus@net-b.de>
PR fortran/41219 PR fortran/41219
......
...@@ -287,7 +287,7 @@ static void ...@@ -287,7 +287,7 @@ static void
eat_line (st_parameter_dt *dtp) eat_line (st_parameter_dt *dtp)
{ {
char c; char c;
if (!is_internal_unit (dtp))
do do
c = next_char (dtp); c = next_char (dtp);
while (c != '\n'); while (c != '\n');
...@@ -2374,10 +2374,10 @@ nml_read_obj (st_parameter_dt *dtp, namelist_info * nl, index_type offset, ...@@ -2374,10 +2374,10 @@ nml_read_obj (st_parameter_dt *dtp, namelist_info * nl, index_type offset,
if (dtp->u.p.input_complete) if (dtp->u.p.input_complete)
return SUCCESS; return SUCCESS;
/* GFC_TYPE_UNKNOWN through for nulls and is detected /* BT_NULL (equivalent to GFC_DTYPE_UNKNOWN) falls through
after the switch block. */ for nulls and is detected at default: of switch block. */
dtp->u.p.saved_type = GFC_DTYPE_UNKNOWN; dtp->u.p.saved_type = BT_NULL;
free_saved (dtp); free_saved (dtp);
switch (nl->type) switch (nl->type)
...@@ -2467,7 +2467,7 @@ nml_read_obj (st_parameter_dt *dtp, namelist_info * nl, index_type offset, ...@@ -2467,7 +2467,7 @@ nml_read_obj (st_parameter_dt *dtp, namelist_info * nl, index_type offset,
return SUCCESS; return SUCCESS;
} }
if (dtp->u.p.saved_type == GFC_DTYPE_UNKNOWN) if (dtp->u.p.saved_type == BT_NULL)
{ {
dtp->u.p.expanded_read = 0; dtp->u.p.expanded_read = 0;
goto incr_idx; goto incr_idx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment