modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / read_size_noadvance.f90
blobe4440c234f68d377e55a0d71f5a7174b3bc12671
1 ! { dg-do run }
2 ! PR26890 Test for use of SIZE variable in IO list.
3 ! Test case from Paul Thomas.
4 ! Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
6 character(80) :: buffer, line
7 integer :: nchars
8 line = "The quick brown fox jumps over the lazy dog."
9 open (10, status="scratch")
10 write (10, '(a)') trim(line)
11 rewind (10)
12 read (10, '(a)', advance = 'no', size = nchars, eor = 998) buffer
13 STOP 1
14 998 if (nchars.ne.44) STOP 2
15 rewind (10)
16 buffer = "how about some random text here just to be sure on this one."
17 nchars = 80
18 read (10, '(a)', advance = 'no', size = nchars, eor = 999) buffer(:nchars)
19 999 if (nchars.ne.44) STOP 3
20 if (buffer.ne.line) STOP 4
21 close (10)
22 end