(root)/
gcc-13.2.0/
gcc/
testsuite/
gfortran.dg/
use_15.f90
! { 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)              ! { dg-error "\(1\)" }
  use test_mod2, my_sub3 => my_sub2 ! { dg-error "conflicts with the rename" }
  real a
  print *, a
end subroutine

END ! { dg-error "is an ambiguous reference" }