ieee_9.f90: XFAIL on arm*-*-gnueabi[hf].
[official-gcc.git] / gcc / testsuite / gfortran.dg / iomsg_2.f90
blob29500ed01aea474e62a200435cbcb6f003117f03
1 ! { dg-do compile }
2 subroutine foo1
3 implicit none
4 integer i
5 open(1, iomsg=666) ! { dg-error "IOMSG must be" }
6 open(1, iomsg='sgk') ! { dg-error "IOMSG must be" }
7 open(1, iomsg=i) ! { dg-error "IOMSG must be" }
8 close(1, iomsg=666) ! { dg-error "IOMSG must be" }
9 close(1, iomsg='sgk') ! { dg-error "IOMSG must be" }
10 close(1, iomsg=i) ! { dg-error "IOMSG must be" }
11 end subroutine foo1
13 subroutine foo
14 implicit none
15 integer i
16 real :: x = 1
17 write(1, *, iomsg='sgk') x ! { dg-error "IOMSG must be" }
18 write(1, *, iomsg=i) x ! { dg-error "IOMSG must be" }
19 read(1, *, iomsg='sgk') x ! { dg-error "IOMSG must be" }
20 read(1, *, iomsg=i) x ! { dg-error "IOMSG must be" }
21 flush(1, iomsg='sgk') ! { dg-error "IOMSG must be" }
22 flush(1, iomsg=i) ! { dg-error "IOMSG must be" }
23 rewind(1, iomsg='sgk') ! { dg-error "IOMSG must be" }
24 rewind(1, iomsg=i) ! { dg-error "IOMSG must be" }
25 backspace(1,iomsg='sgk') ! { dg-error "IOMSG must be" }
26 backspace(1,iomsg=i) ! { dg-error "IOMSG must be" }
27 wait(1, iomsg='sgk') ! { dg-error "IOMSG must be" }
28 wait(1, iomsg=i) ! { dg-error "IOMSG must be" }
29 end subroutine foo
31 subroutine bar
32 implicit none
33 integer i
34 real :: x = 1
35 character(len=20) s(2)
36 open(1, iomsg=s) ! { dg-error "must be scalar" }
37 close(1, iomsg=s) ! { dg-error "must be scalar" }
38 write(1, *, iomsg=s) x ! { dg-error "must be scalar" }
39 read(1, *, iomsg=s) x ! { dg-error "must be scalar" }
40 flush(1, iomsg=s) ! { dg-error "must be scalar" }
41 rewind(1, iomsg=s) ! { dg-error "must be scalar" }
42 backspace(1,iomsg=s) ! { dg-error "must be scalar" }
43 wait(1, iomsg=s) ! { dg-error "must be scalar" }
44 end subroutine bar