mirror of git://gcc.gnu.org/git/gcc.git
re PR libfortran/47154 (END= does not work in namelist read)
2011-01-04 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/47154 * io/list_read.c (namelist_read): Remove calls to hit_eof to avoid the duplicate calls via next_record. From-SVN: r168502
This commit is contained in:
parent
535e081a5a
commit
43e0224a58
|
@ -1,3 +1,9 @@
|
||||||
|
2011-01-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR libgfortran/47154
|
||||||
|
* io/list_read.c (namelist_read): Remove calls to hit_eof to avoid the
|
||||||
|
duplicate calls via next_record.
|
||||||
|
|
||||||
|
|
||||||
Copyright (C) 2011 Free Software Foundation, Inc.
|
Copyright (C) 2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
|
|
@ -2984,8 +2984,7 @@ namelist_read (st_parameter_dt *dtp)
|
||||||
node names or namelist on stdout. */
|
node names or namelist on stdout. */
|
||||||
|
|
||||||
find_nml_name:
|
find_nml_name:
|
||||||
if ((c = next_char (dtp)) == EOF)
|
c = next_char (dtp);
|
||||||
goto nml_err_eof;
|
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case '$':
|
case '$':
|
||||||
|
@ -2993,13 +2992,11 @@ find_nml_name:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '!':
|
case '!':
|
||||||
if (eat_line (dtp))
|
eat_line (dtp);
|
||||||
goto nml_err_eof;
|
|
||||||
goto find_nml_name;
|
goto find_nml_name;
|
||||||
|
|
||||||
case '=':
|
case '=':
|
||||||
if ((c = next_char (dtp)) == EOF)
|
c = next_char (dtp);
|
||||||
goto nml_err_eof;
|
|
||||||
if (c == '?')
|
if (c == '?')
|
||||||
nml_query (dtp, '=');
|
nml_query (dtp, '=');
|
||||||
else
|
else
|
||||||
|
@ -3009,6 +3006,9 @@ find_nml_name:
|
||||||
case '?':
|
case '?':
|
||||||
nml_query (dtp, '?');
|
nml_query (dtp, '?');
|
||||||
|
|
||||||
|
case EOF:
|
||||||
|
return;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
goto find_nml_name;
|
goto find_nml_name;
|
||||||
}
|
}
|
||||||
|
@ -3021,8 +3021,7 @@ find_nml_name:
|
||||||
goto find_nml_name;
|
goto find_nml_name;
|
||||||
|
|
||||||
/* A trailing space is required, we give a little lattitude here, 10.9.1. */
|
/* A trailing space is required, we give a little lattitude here, 10.9.1. */
|
||||||
if ((c = next_char (dtp)) == EOF)
|
c = next_char (dtp);
|
||||||
goto nml_err_eof;
|
|
||||||
if (!is_separator(c) && c != '!')
|
if (!is_separator(c) && c != '!')
|
||||||
{
|
{
|
||||||
unget_char (dtp, c);
|
unget_char (dtp, c);
|
||||||
|
@ -3050,13 +3049,10 @@ find_nml_name:
|
||||||
free_line (dtp);
|
free_line (dtp);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* All namelist error calls return from here */
|
|
||||||
|
|
||||||
nml_err_eof:
|
|
||||||
hit_eof (dtp);
|
|
||||||
|
|
||||||
nml_err_ret:
|
nml_err_ret:
|
||||||
|
|
||||||
|
/* All namelist error calls return from here */
|
||||||
free_saved (dtp);
|
free_saved (dtp);
|
||||||
free_line (dtp);
|
free_line (dtp);
|
||||||
generate_error (&dtp->common, LIBERROR_READ_VALUE, nml_err_msg);
|
generate_error (&dtp->common, LIBERROR_READ_VALUE, nml_err_msg);
|
||||||
|
|
Loading…
Reference in New Issue