view gcc/testsuite/gfortran.dg/statement_function_1.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { 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" }