From 77747e5f2d1fc0bc4dc4aaf137da9dc158697c81 Mon Sep 17 00:00:00 2001 From: Bud Davis Date: Tue, 21 Sep 2004 11:22:47 +0000 Subject: [PATCH] re PR libfortran/17286 (namelist containing more than one value cannot contain whitespace or newlines for READ) 2004-09-21 Bud Davis PR fortran/17286 * io/list_read.c (namelist_read): ignore spaces after the '=' for namelist reads. 2004-09-21 Bud Davis PR fortran/17286 * gfortran.dg/pr17286.f90: New test. From-SVN: r87799 --- gcc/testsuite/ChangeLog | 5 +++ gcc/testsuite/gfortran.dg/pr17286.f90 | 45 +++++++++++++++++++++++++++ libgfortran/ChangeLog | 6 ++++ libgfortran/io/list_read.c | 4 +++ 4 files changed, 60 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/pr17286.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2d2e5b63643..e64aafb22f5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-09-21 Bud Davis + + PR fortran/17286 + * gfortran.dg/pr17286.f90: New test. + 2004-09-20 Mark Mitchell PR c++/17530 diff --git a/gcc/testsuite/gfortran.dg/pr17286.f90 b/gcc/testsuite/gfortran.dg/pr17286.f90 new file mode 100644 index 00000000000..ccd100f93b0 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr17286.f90 @@ -0,0 +1,45 @@ +! pr17286 +! namelist read fails when spaces exist between the '=' and the numbers +! this is a libgfortran bug +! derived from testcase provided by Paul Thomas + + PR fortran/17286 + * io/list_read.c (namelist_read): ignore spaces after + the '=' for namelist reads. + 2004-09-15 Aaron W. LaFramboise * config.h.in: Regenerate. diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 51767d07672..80078a87999 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -1496,6 +1496,10 @@ restart: len = nl->len; p = nl->mem_pos; + + /* skip any blanks or tabs after the = */ + eat_spaces (); + switch (nl->type) { case BT_INTEGER: -- 2.30.2