mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-17 14:16:42 +00:00

Due to unavailability of Flang testing on Windows, the shell scripts are being ported to Python. The following changes are being made in this patch: removed test_symbols.sh and common.sh, and ported them to Python. Changes to the tests themselves so that they use the python scripts instead of the shell script. Reviewed By: Meinersbur, awarzynski, kiranchandramohan Differential Revision: https://reviews.llvm.org/D107041
31 lines
810 B
Fortran
31 lines
810 B
Fortran
! RUN: %python %S/test_symbols.py %s %flang_fc1
|
|
! Test that intent-stmt and subprogram prefix and suffix are resolved.
|
|
|
|
!DEF: /m Module
|
|
module m
|
|
!DEF: /m/f PRIVATE, PURE, RECURSIVE (Function) Subprogram REAL(4)
|
|
private :: f
|
|
contains
|
|
!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)
|
|
pure subroutine s (x, y) bind(c)
|
|
!REF: /m/s/x
|
|
intent(in) :: x
|
|
!REF: /m/s/y
|
|
intent(inout) :: y
|
|
contains
|
|
!DEF: /m/s/ss PURE (Subroutine) Subprogram
|
|
pure subroutine ss
|
|
end subroutine
|
|
end subroutine
|
|
!REF: /m/f
|
|
!DEF: /m/f/x ALLOCATABLE ObjectEntity REAL(4)
|
|
recursive pure function f() result(x)
|
|
!REF: /m/f/x
|
|
real, allocatable :: x
|
|
!REF: /m/f/x
|
|
x = 1.0
|
|
end function
|
|
end module
|