[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / io06.f90
blobe3bc7602a66a36f3ef0de21e79b89350f263b764
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 character(kind=1,len=100) msg1
3 character(kind=2,len=200) msg2
4 character, parameter :: const_msg = 'doof'
5 integer(1) stat1
6 integer(2) stat2
7 integer(8) stat8
9 open(10)
11 backspace(10)
12 backspace(10, iomsg=msg1, iostat=stat1, err=9)
14 endfile(unit=10)
15 endfile(iostat=stat2, err=9, unit=10, iomsg=msg1)
17 rewind(10)
18 rewind(iomsg=msg1, iostat=stat2, err=9, unit=10)
20 flush(10)
21 flush(iomsg=msg1, unit=10, iostat=stat8, err=9)
23 wait(10)
24 wait(99, id=id1, end=9, eor=9, err=9, iostat=stat1, iomsg=msg1)
26 !ERROR: Duplicate UNIT specifier
27 backspace(10, unit=11)
29 !ERROR: Duplicate IOSTAT specifier
30 endfile(iostat=stat2, err=9, unit=10, iostat=stat8, iomsg=msg1)
32 !ERROR: IOMSG variable 'const_msg' must be definable
33 flush(iomsg=const_msg, unit=10, iostat=stat8, err=9)
35 !ERROR: REWIND statement must have a UNIT number specifier
36 rewind(iostat=stat2)
38 !ERROR: Duplicate ERR specifier
39 flush(err=9, unit=10, &
40 err=9, &
41 err=9)
43 !ERROR: Duplicate ID specifier
44 !ERROR: WAIT statement must have a UNIT number specifier
45 wait(id=id2, eor=9, id=id3)
47 9 continue
48 end