3 ! Test the fix for PR78474.
5 ! Contributed by Nicholas Brearly <nick.brealey@cobham.com>
11 module subroutine sub1()
15 module subroutine sub2()
19 module subroutine sub3()
24 submodule (mtop) submod
28 module subroutine sub1
33 submodule (mtop:submod) subsubmod
35 module subroutine sub2
41 submodule (mtop:submod:subsubmod) subsubsubmod ! { dg-error "Syntax error in SUBMODULE statement" }
43 module subroutine sub3 ! { dg-error "found outside of a module" }
44 r = 2.0 ! { dg-error "Unexpected assignment" }
45 s = 2.0 ! { dg-error "Unexpected assignment" }
46 end subroutine sub3 ! { dg-error "Expecting END PROGRAM statement" }