[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Semantics / separate-mp05.f90
blobad002142fd285e0203e6f46080e36a810ae95eb0
1 ! RUN: %python %S/test_symbols.py %s %flang_fc1
2 ! Ensure that SMPs work with dummy procedures declared as interfaces
3 !DEF: /m Module
4 module m
5 implicit none
6 interface
7 !DEF: /m/smp MODULE, PUBLIC, PURE (Function) Subprogram REAL(4)
8 !DEF: /m/smp/f EXTERNAL, PURE (Function) Subprogram REAL(4)
9 !DEF: /m/smp/x INTENT(IN) ObjectEntity REAL(4)
10 !DEF: /m/smp/res ObjectEntity REAL(4)
11 pure module function smp(f, x) result(res)
12 !REF: /m/smp/res
13 real res
14 interface
15 !REF: /m/smp/f
16 !DEF: /m/smp/f/x INTENT(IN) ObjectEntity REAL(4)
17 !DEF: /m/smp/f/r ObjectEntity REAL(4)
18 pure function f(x) result(r)
19 !REF: /m/smp/f/x
20 real, intent(in) :: x
21 !REF: /m/smp/f/r
22 real r
23 end function
24 end interface
25 !REF: /m/smp/x
26 real, intent(in) :: x
27 end function
28 end interface
29 end module
30 !REF: /m
31 !DEF: /m/sm Module
32 submodule (m)sm
33 implicit none
34 contains
35 !DEF: /m/sm/smp MODULE, PUBLIC, PURE (Function) Subprogram REAL(4)
36 module procedure smp
37 !DEF: /m/sm/smp/res ObjectEntity REAL(4)
38 !DEF: /m/sm/smp/f EXTERNAL, PURE (Function) Subprogram REAL(4)
39 !DEF: /m/sm/smp/x INTENT(IN) ObjectEntity REAL(4)
40 res = f(x)
41 end procedure
42 end submodule