PR libfortran/23262
[official-gcc.git] / gcc / testsuite / gfortran.dg / negative_unit.f
blobfd0100a14de4eef40bb22f74cf1a5f35d99c6fb1
1 ! { dg-do run }
3 ! PR libfortran/20660 and other bugs (not filed in bugzilla) relating
4 ! to negative units
6 ! Bugs submitted by Walt Brainerd
7 integer i
8 logical l
10 i = 0
11 ! gfortran created a 'fort.-1' file and wrote "Hello" in it
12 write (unit=-1, fmt=*, iostat=i) "Hello"
13 if (i <= 0) call abort
15 i = 0
16 open (unit=-11, file="xxx", iostat=i)
17 if (i <= 0) call abort
19 inquire (unit=-42, exist=l)
20 if (l) call abort
22 end