1! RUN: %S/test_errors.sh %s %t %f18
2  integer :: unit10 = 10
3  integer :: unit11 = 11
4  integer, parameter :: const_stat = 6666
5
6  integer(kind=1) :: stat1
7  integer(kind=8) :: stat8
8
9  character(len=55) :: msg
10
11  close(unit10)
12  close(unit=unit11, err=9, iomsg=msg, iostat=stat1)
13  close(12, status='Keep')
14
15  close(iostat=stat8, 11) ! nonstandard
16
17  !ERROR: CLOSE statement must have a UNIT number specifier
18  close(iostat=stat1)
19
20  !ERROR: Duplicate UNIT specifier
21  close(13, unit=14, err=9)
22
23  !ERROR: Duplicate ERR specifier
24  close(err=9, unit=15, err=9, iostat=stat8)
25
26  !ERROR: Invalid STATUS value 'kept'
27  close(status='kept', unit=16)
28
29  !ERROR: Invalid STATUS value 'old'
30  close(status='old', unit=17)
31
32  !ERROR: IOSTAT variable 'const_stat' must be definable
33  close(14, iostat=const_stat)
34
359 continue
36end
37