Ivan Zhechev dc453dcf76 [Flang] Port test_modfile.sh to Python
To enable Flang testing on Windows, shell scripts have
to be ported to Python. The following changes have been made:
"test_modfile.sh" has been ported to Python, and
the relevant tests relying on it.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D107956
2021-09-06 13:57:36 +00:00

42 lines
824 B
Fortran

! RUN: %python %S/test_modfile.py %s %flang_fc1
! Check modfile generation for external declarations
module m
real, external :: a
logical b
external c
complex c
external b, d
procedure() :: e
procedure(real) :: f
procedure(s) :: g
type t
procedure(), pointer, nopass :: e
procedure(real), nopass, pointer :: f
procedure(s), private, pointer :: g
end type
contains
subroutine s(x)
class(t) :: x
end
end
!Expect: m.mod
!module m
! procedure(real(4))::a
! procedure(logical(4))::b
! procedure(complex(4))::c
! procedure()::d
! procedure()::e
! procedure(real(4))::f
! procedure(s)::g
! type::t
! procedure(),nopass,pointer::e
! procedure(real(4)),nopass,pointer::f
! procedure(s),pointer,private::g
! end type
!contains
! subroutine s(x)
! class(t)::x
! end
!end