llvm-project/flang/test/Semantics/getdefinition02.f

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
790 B
FortranFixed
Raw Normal View History

!RUN: %S/test_any.sh %s %t %f18
! Tests -fget-definition with fixed form.
module m2
private :: f
contains
pure subroutine s (x, yyy) bind(c)
intent(in) ::
* x
intent(inout) :: yyy
contains
pure subroutine ss
end subroutine
end subroutine
recursive pure function f() result(x)
real, allocatable :: x
x = 1.0
end function
end module
! EXEC: ${F18} -fget-definition 8 9 10 -fparse-only %s > %t;
! EXEC: ${F18} -fget-definition 9 26 29 -fparse-only %s >> %t;
! EXEC: ${F18} -fget-definition 16 9 10 -fparse-only %s >> %t;
! EXEC: cat %t | ${FileCheck} %s
! CHECK:x:.*getdefinition02.f, 6, 27-28
! CHECK:yyy:.*getdefinition02.f, 6, 30-33
! CHECK:x:.*getdefinition02.f, 15, 30-31