Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / getdefinition02.f
blob223f247c9d5163e9e19713499b2a11e566dde281
1 ! Tests -fget-definition with fixed form.
2 module m2
3 private :: f
4 contains
5 pure subroutine s (x, yyy) bind(c)
6 intent(in) ::
7 * x
8 intent(inout) :: yyy
9 contains
10 pure subroutine ss
11 end subroutine
12 end subroutine
13 recursive pure function f() result(x)
14 real, allocatable :: x
15 x = 1.0
16 end function
17 end module
19 ! RUN and CHECK lines here as test is sensitive to line numbers
20 ! RUN: %flang_fc1 -fget-definition 7 9 10 %s 2>&1 | FileCheck --check-prefix=CHECK1 %s
21 ! RUN: %flang_fc1 -fget-definition 8 26 29 %s 2>&1 | FileCheck --check-prefix=CHECK2 %s
22 ! RUN: %flang_fc1 -fget-definition 15 9 10 %s 2>&1 | FileCheck --check-prefix=CHECK3 %s
23 ! CHECK1: x:{{.*}}getdefinition02.f, 5, 27-28
24 ! CHECK2: yyy:{{.*}}getdefinition02.f, 5, 30-33
25 ! CHECK3: x:{{.*}}getdefinition02.f, 14, 30-31