nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / iomsg_2.f90
blob5023692daefa530e9218315c2a46bbe33c71d906
1 ! { dg-do compile }
2 subroutine foo1
3 implicit none
4 integer i
5 open(1, iomsg=666) ! { dg-error "must be of type CHARACTER" }
6 open(1, iomsg='sgk') ! { dg-error "Non-variable expression" }
7 open(1, iomsg=i) ! { dg-error "must be of type CHARACTER" }
8 close(1, iomsg=666) ! { dg-error "must be of type CHARACTER" }
9 close(1, iomsg='sgk') ! { dg-error "Non-variable expression" }
10 close(1, iomsg=i) ! { dg-error "must be of type CHARACTER" }
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 "Non-variable expression" }
18 write(1, *, iomsg=i) x ! { dg-error "must be of type CHARACTER" }
19 read(1, *, iomsg='sgk') x ! { dg-error "Non-variable expression" }
20 read(1, *, iomsg=i) x ! { dg-error "must be of type CHARACTER" }
21 flush(1, iomsg='sgk') ! { dg-error "Non-variable expression" }
22 flush(1, iomsg=i) ! { dg-error "must be of type CHARACTER" }
23 rewind(1, iomsg='sgk') ! { dg-error "Non-variable expression" }
24 rewind(1, iomsg=i) ! { dg-error "must be of type CHARACTER" }
25 backspace(1,iomsg='sgk') ! { dg-error "Non-variable expression" }
26 backspace(1,iomsg=i) ! { dg-error "must be of type CHARACTER" }
27 wait(1, iomsg='sgk') ! { dg-error "Non-variable expression" }
28 wait(1, iomsg=i) ! { dg-error "must be of type CHARACTER" }
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