fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / endfile_2.f90
blobe91e80eb2aa80c18f722cb67b93abeb0760d224f
1 ! { dg-do run }
2 ! pr18778 abort on endfile without opening unit
3 program test
4 implicit none
5 integer i
6 endfile(8)
7 rewind(8)
8 read(8,end=0023)i
9 call abort ! should never get here
10 stop
11 0023 continue
12 close(8,status='delete')
13 end