From: jvdelisle Date: Fri, 12 Feb 2016 19:52:13 +0000 (+0000) Subject: 2016-02-12 Jerry DeLisle X-Git-Tag: upstream/6.1~1107 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1774ff82e1eeca3fb9e59f4e02030d0e15a32b2b;p=platform%2Fupstream%2Flinaro-gcc.git 2016-02-12 Jerry DeLisle PR libgfortran/69668 * io/list_read.c (read_character): Remove code related to DELIM_NONE. PR libgfortran/69668 * gfortran.dg/namelist_38.f90: Update test. * gfortran.dg/namelist_84.f90: Update test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233387 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6d01ca3..7bed3ca 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2016-02-12 Jerry DeLisle + + PR libgfortran/69668 + * gfortran.dg/namelist_38.f90: Update test. + * gfortran.dg/namelist_84.f90: Update test. + 2016-02-12 David Malcolm PR other/69554 diff --git a/gcc/testsuite/gfortran.dg/namelist_38.f90 b/gcc/testsuite/gfortran.dg/namelist_38.f90 index 5578654..b51463c 100644 --- a/gcc/testsuite/gfortran.dg/namelist_38.f90 +++ b/gcc/testsuite/gfortran.dg/namelist_38.f90 @@ -5,6 +5,7 @@ program main implicit none character(len=3) :: a + character(25) :: b namelist /foo/ a open(10, status="scratch", delim="quote") @@ -28,9 +29,12 @@ program main open(10, status="scratch", delim="none") a = "a'a" write(10,foo) - rewind 10 - a = "" - read (10,foo) - if (a.ne."a'a") call abort - close (10) + rewind (10) + read(10,"(a)") b + if (b .ne. "&FOO") call abort + read(10,"(a)") b + if (b .ne. " A=a'a") call abort + read(10,"(a)") b + if (b .ne. " /") call abort + close(10) end program main diff --git a/gcc/testsuite/gfortran.dg/namelist_84.f90 b/gcc/testsuite/gfortran.dg/namelist_84.f90 index af139d9..14b68a4 100644 --- a/gcc/testsuite/gfortran.dg/namelist_84.f90 +++ b/gcc/testsuite/gfortran.dg/namelist_84.f90 @@ -17,12 +17,11 @@ program namelist_delim_none write(10, mylist) rewind(10) mystring = "xxxxx" - read(10,mylist) - if (any(mystring /= (/ 'mon', 'tue', 'wed', 'thu', 'fri' /))) call abort rewind(10) do i=1,5 read(10,'(a)') internal_unit - if (scan(internal_unit,"""'").ne.0) call abort + if (i.eq.2 .and. internal_unit .ne. " MYSTRING=mon tue wed thu fri ,") call abort + if (scan(internal_unit,"""'").ne.0) print *, internal_unit end do close(10) end program diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 4c7befa..7d0cb66 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2016-02-12 Jerry DeLisle + + PR libgfortran/69668 + * io/list_read.c (read_character): Remove code related to DELIM_NONE. + 2016-01-23 John David Anglin PR libfortran/68744 diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index 052219b..efbbcb6 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -1131,21 +1131,6 @@ read_character (st_parameter_dt *dtp, int length __attribute__ ((unused))) default: if (dtp->u.p.namelist_mode) { - if (dtp->u.p.current_unit->delim_status == DELIM_NONE) - { - /* No delimiters so finish reading the string now. */ - int i; - push_char (dtp, c); - for (i = dtp->u.p.ionml->string_length; i > 1; i--) - { - if ((c = next_char (dtp)) == EOF) - goto done_eof; - push_char (dtp, c); - } - dtp->u.p.saved_type = BT_CHARACTER; - free_line (dtp); - return; - } unget_char (dtp, c); return; }