comparison gcc/testsuite/gfortran.dg/read_eof_all.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
12 close(99) 12 close(99)
13 13
14 open(99,file='test.dat') 14 open(99,file='test.dat')
15 read(99, '(T7,i2)') i 15 read(99, '(T7,i2)') i
16 close(99, status="delete") 16 close(99, status="delete")
17 if (i /= 0) call abort 17 if (i /= 0) STOP 1
18 18
19 read(str(1:0), '(T7,i1)') i 19 read(str(1:0), '(T7,i1)') i
20 if (i /= 0) call abort 20 if (i /= 0) STOP 2
21 21
22 read(str,'(i2,/,i2)',end=111) a, b 22 read(str,'(i2,/,i2)',end=111) a, b
23 call abort !stop 'ERROR: Expected EOF error (1)' 23 STOP 3!stop 'ERROR: Expected EOF error (1)'
24 111 continue 24 111 continue
25 25
26 read(str2,'(i2,/,i2)',end=112) a, b 26 read(str2,'(i2,/,i2)',end=112) a, b
27 27
28 read(str2,'(i2,/,i2,/,i2)',end=113) a, b, c 28 read(str2,'(i2,/,i2,/,i2)',end=113) a, b, c
29 call abort !stop 'ERROR: Expected EOF error (2)' 29 STOP 4!stop 'ERROR: Expected EOF error (2)'
30 30
31 112 call abort !stop 'ERROR: Unexpected EOF (3)' 31 112 STOP 5!stop 'ERROR: Unexpected EOF (3)'
32 32
33 113 continue 33 113 continue
34 read(str,'(i2,/,i2)',end=121,pad='no') a, b 34 read(str,'(i2,/,i2)',end=121,pad='no') a, b
35 call abort !stop 'ERROR: Expected EOF error (1)' 35 STOP 6!stop 'ERROR: Expected EOF error (1)'
36 121 continue 36 121 continue
37 37
38 read(str2(:),'(i2,/,i2)', end=122, pad='no') a, b 38 read(str2(:),'(i2,/,i2)', end=122, pad='no') a, b
39 goto 125 39 goto 125
40 122 call abort !stop 'ERROR: Expected no EOF error (2)' 40 122 STOP 7!stop 'ERROR: Expected no EOF error (2)'
41 125 continue 41 125 continue
42 42
43 read(str2(:),'(i2,/,i2,/,i2)',end=123,pad='no') a, b, c 43 read(str2(:),'(i2,/,i2,/,i2)',end=123,pad='no') a, b, c
44 call abort !stop 'ERROR: Expected EOF error (3)' 44 STOP 8!stop 'ERROR: Expected EOF error (3)'
45 123 continue 45 123 continue
46 46
47 read(str(2:1),'(i2,/,i2)',end=131, pad='no') a, b 47 read(str(2:1),'(i2,/,i2)',end=131, pad='no') a, b
48 call abort !stop 'ERROR: Expected EOF error (1)' 48 STOP 9!stop 'ERROR: Expected EOF error (1)'
49 131 continue 49 131 continue
50 50
51 read(str2(:)(2:1),'(i2,/,i2)',end=132, pad='no') a, b 51 read(str2(:)(2:1),'(i2,/,i2)',end=132, pad='no') a, b
52 call abort !stop 'ERROR: Expected EOF error (2)' 52 STOP 10!stop 'ERROR: Expected EOF error (2)'
53 132 continue 53 132 continue
54 54
55 read(str2(:)(2:1),'(i2,/,i2,/,i2)',end=133,pad='no') a, b, c 55 read(str2(:)(2:1),'(i2,/,i2,/,i2)',end=133,pad='no') a, b, c
56 call abort !stop 'ERROR: Expected EOF error (3)' 56 STOP 11!stop 'ERROR: Expected EOF error (3)'
57 133 continue 57 133 continue
58 58
59 read(str(2:1),'(i2,/,i2)',iostat=ios, pad='no') a, b 59 read(str(2:1),'(i2,/,i2)',iostat=ios, pad='no') a, b
60 if (ios /= IOSTAT_END) call abort !stop 'ERROR: expected iostat /= 0 (1)' 60 if (ios /= IOSTAT_END) STOP 12!stop 'ERROR: expected iostat /= 0 (1)'
61 61
62 read(str2(:)(2:1),'(i2,/,i2)',iostat=ios, pad='no') a, b 62 read(str2(:)(2:1),'(i2,/,i2)',iostat=ios, pad='no') a, b
63 if (ios /= IOSTAT_END) call abort !stop 'ERROR: expected iostat /= 0 (2)' 63 if (ios /= IOSTAT_END) STOP 13!stop 'ERROR: expected iostat /= 0 (2)'
64 64
65 read(str2(:)(2:1),'(i2,/,i2,/,i2)',iostat=ios,pad='no') a, b, c 65 read(str2(:)(2:1),'(i2,/,i2,/,i2)',iostat=ios,pad='no') a, b, c
66 if (ios /= IOSTAT_END) call abort !stop 'ERROR: expected iostat /= 0 (2)' 66 if (ios /= IOSTAT_END) STOP 14!stop 'ERROR: expected iostat /= 0 (2)'
67 67
68 ! print *, "success" 68 ! print *, "success"
69 end 69 end
70 70
71 71