1 ! RUN: %python %S/test_errors.py %s %flang_fc1
4 integer, parameter :: const_stat
= 6666
6 integer(kind
=1) :: stat1
7 integer(kind
=8) :: stat8
9 character(len
=55) :: msg
12 close(unit
=unit11
, err
=9, iomsg
=msg
, iostat
=stat1
)
13 close(12, status
='Keep')
15 close(iostat
=stat8
, 11) ! nonstandard
17 !ERROR: CLOSE statement must have a UNIT number specifier
20 !ERROR: Duplicate UNIT specifier
21 close(13, unit
=14, err
=9)
23 !ERROR: Duplicate ERR specifier
24 close(err
=9, unit
=15, err
=9, iostat
=stat8
)
26 !ERROR: Invalid STATUS value 'kept'
27 close(status
='kept', unit
=16)
29 !ERROR: Invalid STATUS value 'old'
30 close(status
='old', unit
=17)
32 !Ok: trailing spaces ignored
33 close(status
='keep ', unit
=17)
35 !ERROR: IOSTAT variable 'const_stat' is not definable
36 !BECAUSE: '6666_4' is not a variable or pointer
37 close(14, iostat
=const_stat
)