2020-05-12 02:38:53 +08:00
|
|
|
! RUN: %S/test_symbols.sh %s %t %f18
|
2018-07-12 08:45:13 +08:00
|
|
|
! Test that intent-stmt and subprogram prefix and suffix are resolved.
|
|
|
|
|
|
|
|
!DEF: /m Module
|
|
|
|
module m
|
2019-09-13 14:03:06 +08:00
|
|
|
!DEF: /m/f PRIVATE, PURE, RECURSIVE (Function) Subprogram REAL(4)
|
2018-07-12 08:45:13 +08:00
|
|
|
private :: f
|
|
|
|
contains
|
2019-09-13 14:03:06 +08:00
|
|
|
!DEF: /m/s BIND(C), PUBLIC, PURE (Subroutine) Subprogram
|
|
|
|
!DEF: /m/s/x INTENT(IN) (Implicit) ObjectEntity REAL(4)
|
|
|
|
!DEF: /m/s/y INTENT(INOUT) (Implicit) ObjectEntity REAL(4)
|
2018-07-12 08:45:13 +08:00
|
|
|
pure subroutine s (x, y) bind(c)
|
2018-10-16 05:44:01 +08:00
|
|
|
!REF: /m/s/x
|
2018-07-12 08:45:13 +08:00
|
|
|
intent(in) :: x
|
2018-10-16 05:44:01 +08:00
|
|
|
!REF: /m/s/y
|
2018-07-12 08:45:13 +08:00
|
|
|
intent(inout) :: y
|
|
|
|
contains
|
2019-09-13 14:03:06 +08:00
|
|
|
!DEF: /m/s/ss PURE (Subroutine) Subprogram
|
2018-07-12 08:45:13 +08:00
|
|
|
pure subroutine ss
|
|
|
|
end subroutine
|
|
|
|
end subroutine
|
2018-10-16 05:44:01 +08:00
|
|
|
!REF: /m/f
|
2018-09-12 08:33:42 +08:00
|
|
|
!DEF: /m/f/x ALLOCATABLE ObjectEntity REAL(4)
|
2018-07-12 08:45:13 +08:00
|
|
|
recursive pure function f() result(x)
|
2018-10-16 05:44:01 +08:00
|
|
|
!REF: /m/f/x
|
2018-07-12 08:45:13 +08:00
|
|
|
real, allocatable :: x
|
|
|
|
!REF: /m/f/x
|
|
|
|
x = 1.0
|
|
|
|
end function
|
|
|
|
end module
|