aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/statement_function_1.f90
blob: e717725e67e74289bc1403ef1ebd315a52adf38d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
! { dg-do compile }
! PR fortran/84276
      subroutine stepns(hh, h, s, w)
      real, intent(inout) :: h, hh, s
      real, intent(out) :: w
      real :: qofs
      integer i
      qofs(s) = s
      w = qofs(hh + h)
      i = 42
      w = qofs(i)       ! { dg-error "Type mismatch in argument" }
      end subroutine stepns

      subroutine step(hh, h, s, w)
      real, intent(inout) :: h, hh, s
      real, intent(out) :: w
      real :: qofs
      integer i
      qofs(s, i) = i * s
      i = 42
      w = qofs(hh, i)
      w = qofs(i = i, s = hh) ! { dg-error "invalid in a statement function" }
      end subroutine step
! { dg-prune-output " Obsolescent feature" }