1! { dg-do compile }
2! PR fortran/84276
3      subroutine stepns(hh, h, s, w)
4      real, intent(inout) :: h, hh, s
5      real, intent(out) :: w
6      real :: qofs
7      integer i
8      qofs(s) = s
9      w = qofs(hh + h)
10      i = 42
11      w = qofs(i)       ! { dg-error "Type mismatch in argument" }
12      end subroutine stepns
13
14      subroutine step(hh, h, s, w)
15      real, intent(inout) :: h, hh, s
16      real, intent(out) :: w
17      real :: qofs
18      integer i
19      qofs(s, i) = i * s
20      i = 42
21      w = qofs(hh, i)
22      w = qofs(i = i, s = hh) ! { dg-error "invalid in a statement function" }
23      end subroutine step
24! { dg-prune-output " Obsolescent feature" }
25