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