4 ! Variable definition context checks related to IO.
6 ! Contributed by Daniel Kraft, d@domob.eu.
10 integer, protected :: a
11 character(len=128), protected :: msg
19 write (*, iostat=a) 42 ! { dg-error "variable definition context" }
20 write (*, iomsg=msg) 42 ! { dg-error "variable definition context" }
21 read (*, '(I2)', advance='no', size=a) x ! { dg-error "variable definition context" }
25 inquire (file=msg, id=a, pending=bool)
28 ! These not, but list is not extensive.
29 inquire (unit=1, number=a) ! { dg-error "variable definition context" }
30 inquire (unit=1, encoding=msg) ! { dg-error "variable definition context" }
31 inquire (unit=1, formatted=msg) ! { dg-error "variable definition context" }
33 open (newunit=a, file="foo") ! { dg-error "variable definition context" }