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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [list_read_5.f90] - Blame information for rev 237

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 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
   write(10,'(a)') "123"
22
   rewind(10)
23
   read(10, *, end=20) i,j
24
   call abort()
25
20 continue
26
   if (i.ne.123) call abort()
27
   if (j.ne.0) call abort()
28
! Check internal array unit
29
   i = 0
30
   j = 0
31
   k = 0
32
   read(a(1:5:2),*, end=30)i,j,k
33
   call abort()
34
30 continue
35
   if (i.ne.123) call abort()
36
   if (j.ne.234) call abort()
37
   if (k.ne.0) call abort()
38
end program pr25307

powered by: WebSVN 2.1.0

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