[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / symbol01.f90
blob9fc64e19f2e2a6f51f68cafd24f462c5f25f7c4b
1 ! RUN: %python %S/test_symbols.py %s %flang_fc1
2 ! Test that intent-stmt and subprogram prefix and suffix are resolved.
4 !DEF: /m Module
5 module m
6 !DEF: /m/f PRIVATE, PURE, RECURSIVE (Function) Subprogram REAL(4)
7 private :: f
8 contains
9 !DEF: /m/s BIND(C), PUBLIC, PURE (Subroutine) Subprogram
10 !DEF: /m/s/x INTENT(IN) (Implicit) ObjectEntity REAL(4)
11 !DEF: /m/s/y INTENT(INOUT) (Implicit) ObjectEntity REAL(4)
12 pure subroutine s (x, y) bind(c)
13 !REF: /m/s/x
14 intent(in) :: x
15 !REF: /m/s/y
16 intent(inout) :: y
17 contains
18 !DEF: /m/s/ss PURE (Subroutine) Subprogram
19 pure subroutine ss
20 end subroutine
21 end subroutine
22 !REF: /m/f
23 !DEF: /m/f/x ALLOCATABLE ObjectEntity REAL(4)
24 recursive pure function f() result(x)
25 !REF: /m/f/x
26 real, allocatable :: x
27 !REF: /m/f/x
28 x = 1.0
29 end function
30 end module