94 lines · plain
1! RUN: %python %S/test_modfile.py %s %flang_fc12! modfile with subprograms3 4module m15 type :: t6 end type7contains8 9 pure subroutine Ss(x, y) bind(c)10 logical(1) x11 intent(inout) y12 intent(in) x13 end subroutine14 15 real function f1() result(x)16 x = 1.017 end function18 19 function f2(y)20 complex y21 f2 = 2.022 end function23 24end25 26module m227contains28 type(t) function f3(x)29 use m130 integer, parameter :: a = 231 type t2(b)32 integer, kind :: b = a33 integer :: y34 end type35 type(t2) :: x36 end37 function f4() result(x)38 implicit complex(x)39 end40end41 42! Module with a subroutine with alternate returns43module m344contains45 subroutine altReturn(arg1, arg2, *, *)46 real :: arg147 real :: arg248 end subroutine49end module m350 51!Expect: m1.mod52!module m153!type::t54!end type55!contains56!pure subroutine ss(x,y) bind(c)57!logical(1),intent(in)::x58!real(4),intent(inout)::y59!end60!function f1() result(x)61!real(4)::x62!end63!function f2(y)64!complex(4)::y65!real(4)::f266!end67!end68 69!Expect: m2.mod70!module m271!contains72!function f3(x)73! use m1,only:t74! type::t2(b)75! integer(4),kind::b=2_476! integer(4)::y77! end type78! type(t2(b=2_4))::x79! type(t)::f380!end81!function f4() result(x)82!complex(4)::x83!end84!end85 86!Expect: m3.mod87!module m388!contains89!subroutine altreturn(arg1,arg2,*,*)90!real(4)::arg191!real(4)::arg292!end93!end94