Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gfortran.dg / negative_unit.f
blob4f942e27e988eebde377c5633f5ee8ac7646fc5e
1 ! { dg-do run }
3 ! PR libfortran/20660 and other bugs (not filed in bugzilla) relating
4 ! to negative units
5 ! PR 33055 Runtime error in INQUIRE unit existance with -fdefault-integer-8
6 ! Test case update by Jerry DeLisle <jvdelisle@gcc.gnu.org>
8 ! Bugs submitted by Walt Brainerd
9 integer i
10 logical l
12 i = 0
13 ! gfortran created a 'fort.-1' file and wrote "Hello" in it
14 write (unit=-1, fmt=*, iostat=i) "Hello"
15 if (i <= 0) call abort
17 i = 0
18 open (unit=-11, file="xxx", iostat=i)
19 if (i <= 0) call abort
21 i = 0
22 inquire (unit=-42, exist=l)
23 if (l) call abort
25 end