| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! Checks the fix for PR68534 in which checks for the number |
| 4 |
! failed if either the interface or the module procedure had |
| 5 |
! no dummies. |
| 6 |
! |
| 7 |
! Reported on clf at: |
| 8 |
! https://groups.google.com/forum/#!topic/comp.lang.fortran/-ZgbM5qkFmc |
| 9 |
! |
| 10 |
module m |
| 11 |
implicit none |
| 12 |
interface |
| 13 |
module subroutine foo() |
| 14 |
end subroutine foo |
| 15 |
|
| 16 |
module subroutine bar(i) |
| 17 |
integer, intent(inout) :: i |
| 18 |
end subroutine bar |
| 19 |
end interface |
| 20 |
end module m |
| 21 |
|
| 22 |
submodule(m) sm |
| 23 |
contains |
| 24 |
module subroutine foo(i) ! { dg-error "Mismatch in number of MODULE PROCEDURE formal" } |
| 25 |
integer, intent(inout) :: i |
| 26 |
i = 42 |
| 27 |
end subroutine foo |
| 28 |
|
| 29 |
module subroutine bar ! { dg-error "Mismatch in number of MODULE PROCEDURE formal" } |
| 30 |
print *, "bar" |
| 31 |
end subroutine bar |
| 32 |
end submodule sm |