2020-05-12 02:38:53 +08:00
|
|
|
!RUN: %S/test_any.sh %s %t %f18
|
2019-08-27 06:16:57 +08:00
|
|
|
! Tests -fget-definition with fixed form.
|
2019-09-24 07:39:57 +08:00
|
|
|
module m2
|
2019-08-27 06:16:57 +08:00
|
|
|
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
|
|
|
|
|
2020-02-14 22:02:29 +08:00
|
|
|
! 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
|
2019-12-21 04:52:07 +08:00
|
|
|
! CHECK:x:.*getdefinition02.f, 6, 27-28
|
|
|
|
! CHECK:yyy:.*getdefinition02.f, 6, 30-33
|
|
|
|
! CHECK:x:.*getdefinition02.f, 15, 30-31
|