gcc/testsuite/gfortran.dg/pr85357.f90
raw| 1 | ! { dg-do compile } |
| 2 | module base |
| 3 | implicit none |
| 4 | contains |
| 5 | subroutine summation(i) |
| 6 | integer, intent(in) :: i |
| 7 | end subroutine |
| 8 | end module |
| 9 | |
| 10 | module extended |
| 11 | use base |
| 12 | implicit none |
| 13 | contains |
| 14 | subroutine summation() ! { dg-error "is already defined" } |
| 15 | end subroutine ! { dg-error "Expecting END MODULE statement" } |
| 16 | end module |
| 17 | ! { dg-prune-output "is already defined at" } |