1! { dg-do compile } 2! 3! PR fortran/34657 4! 5module test_mod 6interface 7 subroutine my_sub (a) 8 real a 9 end subroutine 10end interface 11end module 12 13subroutine my_sub (a) 14 use test_mod ! { dg-error "is also the name of the current program unit" } 15 real a 16 print *, a 17end subroutine 18 19 20module test_mod2 21 integer :: my_sub2 22end module 23 24subroutine my_sub2 (a) 25 use test_mod2 ! { dg-error "is also the name of the current program unit" } 26 real a 27 print *, a 28end subroutine 29 30 31subroutine my_sub3 (a) 32 use test_mod2, my_sub3 => my_sub2 ! { dg-error "is also the name of the current program unit" } 33 real a 34 print *, a 35end subroutine 36 37END 38