Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gfortran.dg / list_read_2.f90
blobf60a83620109fb42ab54f328f0b172613ecb34ca
1 ! { dg-do run }
2 ! PR16805
3 ! Test list directed reads from character substrings
4 ! The IO library was reporting an error rather the end-or-fecord when it
5 ! got to the end of an internal file record.
6 program list_read_2
7 implicit none
8 character*10 a
9 data a /'1234567890'/
10 integer i
11 logical debug
12 data debug /.TRUE./
13 read(a,*)i
14 if (i.ne.1234567890) call abort
15 read(a(1:1),*)i
16 if (i.ne.1) call abort
17 read(a(2:2),*)i
18 if (i.ne.2) call abort
19 read(a(1:5),*)i
20 if (i.ne.12345) call abort
21 read(a(5:10),*)i
22 if (i.ne.567890) call abort
23 read(a(10:10),*)i
24 if (i.ne.0) call abort
25 end