Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / getsymbols01.f90
blob1a1851e83c1144bfe8e4c8dfb514da8da2e83b22
1 ! Tests -fget-symbols-sources finding all symbols in file.
2 module mm1
3 private :: f
4 contains
5 pure subroutine s (x, y) bind(c)
6 intent(in) :: x
7 intent(inout) :: y
8 contains
9 pure subroutine ss
10 end subroutine
11 end subroutine
12 recursive pure function f() result(x)
13 real, allocatable :: x
14 x = 1.0
15 end function
16 end module
18 ! RUN: %flang_fc1 -fget-symbols-sources %s 2>&1 | FileCheck %s
19 ! CHECK-COUNT-1:f:{{.*}}getsymbols01.f90, 12, 26-27
20 ! CHECK-COUNT-1:mm1:{{.*}}getsymbols01.f90, 2, 8-11
21 ! CHECK-COUNT-1:s:{{.*}}getsymbols01.f90, 5, 18-19
22 ! CHECK-COUNT-1:ss:{{.*}}getsymbols01.f90, 9, 19-21
23 ! CHECK-COUNT-1:x:{{.*}}getsymbols01.f90, 5, 21-22
24 ! CHECK-COUNT-1:x:{{.*}}getsymbols01.f90, 13, 24-25
25 ! CHECK-COUNT-1:y:{{.*}}getsymbols01.f90, 5, 24-25