arm: Add .type and .size to __gnu_cmse_nonsecure_call [PR115360]
[official-gcc.git] / gcc / testsuite / gfortran.dg / submodule_22.f08
blobeab398fd3d3f9be48458e9a7bdb180e176d378ec
1 ! { dg-do compile }
3 ! Test the fix for PR78474.
5 ! Contributed by Nicholas Brearly  <nick.brealey@cobham.com>
7 module mtop
8   implicit none
9   real :: r
10   interface
11     module subroutine sub1()
12     end subroutine
13   end interface
14   interface
15     module subroutine sub2()
16     end subroutine
17   end interface
18   interface
19     module subroutine sub3()
20     end subroutine
21   end interface
22 end module mtop
24 submodule (mtop) submod
25   implicit none
26   real :: s
27 contains
28   module subroutine sub1
29     r = 0.0
30   end subroutine sub1
31 end
33 submodule (mtop:submod) subsubmod
34 contains
35   module subroutine sub2
36     r = 1.0
37     s = 1.0
38   end subroutine sub2
39 end
41 submodule (mtop:submod:subsubmod) subsubsubmod ! { dg-error "Syntax error in SUBMODULE statement" }
42 contains
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" }
47 end