summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/use_15.f90
blob: bd5920aa03363cca10a702c2585fb4b5e2a544cc (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
25
26
27
28
29
30
31
32
33
34
35
36
37
! { dg-do compile }
!
! PR fortran/34657
!
module test_mod
interface
  subroutine my_sub (a)
    real a
  end subroutine
end interface
end module

subroutine my_sub (a)
  use test_mod ! { dg-error "is also the name of the current program unit" }
  real a
  print *, a
end subroutine


module test_mod2
  integer :: my_sub2
end module

subroutine my_sub2 (a)
  use test_mod2 ! { dg-error "is also the name of the current program unit" }
  real a
  print *, a
end subroutine


subroutine my_sub3 (a)
  use test_mod2, my_sub3 => my_sub2  ! { dg-error "is also the name of the current program unit" }
  real a
  print *, a
end subroutine

END