Merge from mainline.
[official-gcc.git] / gcc / testsuite / gfortran.dg / inquire_9.f90
blob99cd1af19cf93efc81662320e17577afc299cbca
1 ! PR fortran/24774
2 ! { dg-do run }
3 logical :: l
4 l = .true.
5 inquire (file='inquire_9 file that should not exist', exist=l)
6 if (l) call abort
7 l = .true.
8 inquire (unit=-16, exist=l)
9 if (l) call abort
10 open (unit=16, file='inquire_9.tst')
11 write (unit=16, fmt='(a)') 'Test'
12 l = .false.
13 inquire (unit=16, exist=l)
14 if (.not.l) call abort
15 l = .false.
16 inquire (file='inquire_9.tst', exist=l)
17 if (.not.l) call abort
18 close (unit=16)
19 l = .false.
20 inquire (file='inquire_9.tst', exist=l)
21 if (.not.l) call abort
22 open (unit=16, file='inquire_9.tst')
23 close (unit=16, status='delete')
24 end