summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/namelist_args.f90
blob: 077e2eb783381f864e0edc101fdf686a98a52dae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do compile }
! { dg-options -std=gnu }
! PR50555 synonymous namelist/statement function dummy argument not allowed
subroutine g(k1, k2, k3)
  integer, intent(in) :: k1, k2, k3
  print *, k
end subroutine
function j(k1, k2, k3)
  integer, intent(in) :: k1, k2, k3
  j = 25 * k
end function
program pr50555
  namelist /i/ j
  call g(k,l,i) ! { dg-error "cannot be an argument" }
  f(k,l,i)=0    ! { dg-error "cannot be an argument" }
  h = j(k,l,i)  ! { dg-error "cannot be an argument" }
end program
! Note: -std=gnu needed because line 15 function statement is obsolescent