Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / separate-mp04.f90
blob32005edd91a3148888b6610bc19c1bd349518916
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Checks for multiple module procedure definitions
4 module m1
5 interface
6 module subroutine x001
7 end subroutine
8 module subroutine x002
9 end subroutine
10 module subroutine x003
11 end subroutine
12 end interface
13 end
15 submodule(m1) sm1
16 interface
17 module subroutine x004
18 end subroutine
19 end interface
20 contains
21 module procedure x001 ! fine
22 end procedure
23 module subroutine x002
24 end subroutine
25 module subroutine x003
26 end subroutine
27 end
29 submodule(m1) sm2
30 contains
31 !ERROR: Module procedure 'x002' in module 'm1' has multiple definitions
32 module subroutine x002
33 end subroutine
34 end
36 submodule(m1:sm2) sm3
37 contains
38 !ERROR: Module procedure 'x002' in module 'm1' has multiple definitions
39 module subroutine x002
40 end subroutine
41 !ERROR: Module procedure 'x003' in module 'm1' has multiple definitions
42 module subroutine x003
43 end subroutine
44 end
46 submodule(m1:sm1) sm4
47 contains
48 module subroutine x004
49 end subroutine
50 end
52 submodule(m1:sm1) sm5
53 contains
54 !ERROR: Module procedure 'x004' in module 'm1' has multiple definitions
55 module subroutine x004
56 end subroutine
57 end