OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [list_read_5.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR25307 Check handling of end-of-file conditions for list directed reads.
3
! Prepared by Jerry DeLisle  
4
program pr25307
5
   character(len=10) :: str
6
   character(len=10) :: a(5)
7
   a=""
8
   a(1)="123"
9
   a(3)="234"
10
   str = '123'
11
! Check internal unit
12
   i = 0
13
   j = 0
14
   read( str, *, end=10 ) i,j
15
   call abort()
16
10 continue
17
   if (i.ne.123) call abort()
18
   if (j.ne.0) call abort()
19
! Check file unit
20
   i = 0
21
   open(10, status="scratch")
22
   write(10,'(a)') "123"
23
   rewind(10)
24
   read(10, *, end=20) i,j
25
   call abort()
26
20 continue
27
   if (i.ne.123) call abort()
28
   if (j.ne.0) call abort()
29
! Check internal array unit
30
   i = 0
31
   j = 0
32
   k = 0
33
   read(a(1:5:2),*, end=30)i,j,k
34
   call abort()
35
30 continue
36
   if (i.ne.123) call abort()
37
   if (j.ne.234) call abort()
38
   if (k.ne.0) call abort()
39
end program pr25307

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.