Retro68/gcc/gcc/testsuite/gfortran.dg/use_15.f90
2014-09-21 19:33:12 +02:00

38 lines
639 B
Fortran

! { 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