PR fortran/34427
* io/list_read.c (read_real): Handle intervening line ends and spaces.
(get_name): Don't push separators to saved_string.
(eat_separator): If in namelist mode eat spaces and line ends as well.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131003
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-12-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/34427
+ * io/list_read.c (read_real): Handle intervening line ends and spaces.
+ (get_name): Don't push separators to saved_string.
+ (eat_separator): If in namelist mode eat spaces and line ends as well.
+
2007-12-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34370
2007-12-13 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34370
n = next_char(dtp);
if (n == '\n')
n = next_char(dtp);
if (n == '\n')
+ {
+ if (dtp->u.p.namelist_mode)
+ {
+ do
+ c = next_char (dtp);
+ while (c == '\n' || c == '\r' || c == ' ');
+ unget_char (dtp, c);
+ }
+ }
else
unget_char (dtp, n);
break;
case '\n':
dtp->u.p.at_eol = 1;
else
unget_char (dtp, n);
break;
case '\n':
dtp->u.p.at_eol = 1;
+ if (dtp->u.p.namelist_mode)
+ {
+ do
+ c = next_char (dtp);
+ while (c == '\n' || c == '\r' || c == ' ');
+ unget_char (dtp, c);
+ }
- {
- if (c == 'i' || c == 'I' || c == 'n' || c == 'N')
- goto inf_nan;
- else
- goto bad;
- }
{
char c, message[100];
int seen_dp;
{
char c, message[100];
int seen_dp;
- if (!is_separator (c) || c == '=')
- if (dtp->u.p.namelist_mode && c != ',' && c != '/')
- for (i = 0; i < 63; i++)
- {
- eat_spaces (dtp);
- c = next_char (dtp);
- l_push_char (dtp, c);
- if (c == '=')
- goto unwind;
+ if (dtp->u.p.namelist_mode)
+ {
+ if (c == ' ' || c =='\n' || c == '\r')
+ {
+ do
+ c = next_char (dtp);
+ while (c == ' ' || c =='\n' || c == '\r');
- if (c == ',' || c == '/' || !is_separator(c))
- break;
+ l_push_char (dtp, c);
+
+ if (c == '=')
+ goto unwind;
+ }
- push_char (dtp, tolower(c));
+ if (!is_separator (c))
+ push_char (dtp, tolower(c));
c = next_char (dtp);
} while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' ));
c = next_char (dtp);
} while (!( c=='=' || c==' ' || c=='\t' || c =='(' || c =='%' ));