aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr64925.f90
blob: 612a9c9dbcff6bf67a922ae336d4f689a037cc8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
! { dg-do compile }
! PR fortran/64925
! Original test case provided by Bill Long <longb at cray dot com>
!
subroutine foo(nnn, aaa, bbb, ccc, ddd)
  implicit none
  integer :: nnn, aaa, bbb(nnn)
  integer :: i
  do i=1,nnn
     aaa = aaa + bbb(ccc(i))
  end do
  call ddd(aaa)
contains
  integer function ccc(i)  ! { dg-error "conflicts with DUMMY" }
    integer :: i
    ccc = i
  end function ccc
  subroutine ddd(j)        ! { dg-error "conflicts with DUMMY" }
    integer j
    j = j + 1 
  end subroutine ddd
end subroutine foo