re PR libfortran/26890 (SIZE parameter interacts with same variable in IO list character length specification.)

2006-03-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/26890
	* gfortran.dg/read_size_noadvance.f90: New test.

From-SVN: r112571
This commit is contained in:
Jerry DeLisle 2006-03-31 05:15:42 +00:00
parent d57d342432
commit 9ef47dec91
2 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2006-03-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/26890
* gfortran.dg/read_size_noadvance.f90: New test.
2006-03-30 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/25031

View File

@ -0,0 +1,23 @@
! { dg-do run }
! PR26890 Test for use of SIZE variable in IO list.
! Test case from Paul Thomas.
! Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
character(80) :: buffer, line
integer :: nchars
line = "The quick brown fox jumps over the lazy dog."
open (10)
write (10, '(a)') trim(line)
rewind (10)
read (10, '(a)', advance = 'no', size = nchars, eor = 998) buffer
call abort()
998 if (nchars.ne.44) call abort()
rewind (10)
buffer = "how about some random text here just to be sure on this one."
nchars = 80
read (10, '(a)', advance = 'no', size = nchars, eor = 999) buffer(:nchars)
999 if (nchars.ne.44) call abort()
if (buffer.ne.line) call abort()
close (10, status="delete")
end