Update ChangeLog and version files for release
[official-gcc.git] / gcc / testsuite / gfortran.dg / submodule_13.f08
blob6a4d2ad113e5e440d6b62d96df7a9260ac8c4341
1 ! { dg-do compile }
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.
7 ! Reported on clf at:
8 ! https://groups.google.com/forum/#!topic/comp.lang.fortran/-ZgbM5qkFmc
10 module m
11   implicit none
12     interface
13       module subroutine foo()
14       end subroutine foo
16       module subroutine bar(i)
17         integer, intent(inout) :: i
18       end subroutine bar
19    end interface
20 end module m
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
29   module subroutine bar ! { dg-error "Mismatch in number of MODULE PROCEDURE formal" }
30     print *, "bar"
31   end subroutine bar
32 end submodule sm