mirror of git://gcc.gnu.org/git/gcc.git
backport: re PR libfortran/71123 (Namelist read failure on Windows)
2016-08-11 Jerry DeLisle <jvdelisle@gcc.gnu.org> Backport from trunk PR libgfortran/71123 PR libgfortran/73142 * io/list_read (eat_spaces): Eat '\r' as part of spaces. * gfortran.dg/namelist_90.f: New test. From-SVN: r239382
This commit is contained in:
parent
e6d4736e4e
commit
4f86e9b1ea
|
|
@ -1,3 +1,9 @@
|
||||||
|
2016-08-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||||
|
|
||||||
|
Backport from trunk.
|
||||||
|
PR fortran/71123
|
||||||
|
* gfortran.dg/namelist_90.f: New test.
|
||||||
|
|
||||||
2016-08-11 Andre Vehreschild <vehre@gcc.gnu.org>
|
2016-08-11 Andre Vehreschild <vehre@gcc.gnu.org>
|
||||||
|
|
||||||
Backport from trunk:
|
Backport from trunk:
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
! { dg-do run }
|
||||||
|
! PR71123 Namelist read failure on Windows
|
||||||
|
implicit none
|
||||||
|
integer :: i, ierr
|
||||||
|
real(8), dimension(30) :: senid, res
|
||||||
|
character(2) :: crlf = char(13) // char(10)
|
||||||
|
namelist /fith/ senid
|
||||||
|
do i=1,30
|
||||||
|
res(i) = i
|
||||||
|
enddo
|
||||||
|
senid = 99.0
|
||||||
|
open(unit=7,file='test.out',form='formatted',
|
||||||
|
* status='new',action='readwrite', access='stream')
|
||||||
|
write(7,'(a)') "&fith" // crlf
|
||||||
|
write(7,'(a)') "senid= 1.0 , 2.0 , 3.0 , 4.0 , 5.0 ," // crlf
|
||||||
|
write(7,'(a)') "6.0 , 7.0 , 8.0 , 9.0 , 10.0 , 11.0 ," // crlf
|
||||||
|
write(7,'(a)') "12.0 , 13.0 , 14.0 , 15.0 , 16.0 , 17.0 ," // crlf
|
||||||
|
write(7,'(a)') "18.0 , 19.0 , 20.0 , 21.0 , 22.0 , 23.0 ," // crlf
|
||||||
|
write(7,'(a)') "24.0 , 25.0 , 26.0 , 27.0 , 28.0 , 29.0 ," // crlf
|
||||||
|
write(7,'(a)') "30.0 ," // crlf
|
||||||
|
write(7,'(a)') "/" // crlf
|
||||||
|
close(7)
|
||||||
|
open(unit=7,file='test.out',form='formatted')
|
||||||
|
read(7,nml=fith, iostat=ierr)
|
||||||
|
close(7, status="delete")
|
||||||
|
if (ierr.ne.0) call abort
|
||||||
|
if (any(senid.ne.res)) call abort
|
||||||
|
end
|
||||||
|
|
@ -1,3 +1,10 @@
|
||||||
|
2016-08-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||||
|
|
||||||
|
Backport from trunk
|
||||||
|
PR libgfortran/71123
|
||||||
|
PR libgfortran/73142
|
||||||
|
* io/list_read (eat_spaces): Eat '\r' as part of spaces.
|
||||||
|
|
||||||
2016-06-03 Release Manager
|
2016-06-03 Release Manager
|
||||||
|
|
||||||
* GCC 5.4.0 released.
|
* GCC 5.4.0 released.
|
||||||
|
|
|
||||||
|
|
@ -418,7 +418,7 @@ eat_spaces (st_parameter_dt *dtp)
|
||||||
/* Now skip spaces, EOF and EOL are handled in next_char. */
|
/* Now skip spaces, EOF and EOL are handled in next_char. */
|
||||||
do
|
do
|
||||||
c = next_char (dtp);
|
c = next_char (dtp);
|
||||||
while (c != EOF && (c == ' ' || c == '\t'));
|
while (c != EOF && (c == ' ' || c == '\r' || c == '\t'));
|
||||||
|
|
||||||
unget_char (dtp, c);
|
unget_char (dtp, c);
|
||||||
return c;
|
return c;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue