96 lines · plain
1! RUN: %python %S/test_modfile.py %s %flang_fc12! Check correct modfile generation for type with private component.3module m4 integer :: i5 integer, private :: j6 type :: t7 integer :: i8 integer, private :: j9 end type10 type, private :: u11 end type12 type(t) :: x13end14 15!Expect: m.mod16!module m17!integer(4)::i18!integer(4),private::j19!type::t20!integer(4)::i21!integer(4),private::j22!end type23!type,private::u24!end type25!type(t)::x26!end27 28! Check correct modfile generation for type with private module procedure.29 30module m231 private :: s132contains33 subroutine s1()34 end35 subroutine s2()36 end37end38 39!Expect: m2.mod40!module m241! private::s142!contains43! subroutine s1()44! end45! subroutine s2()46! end47!end48 49module m350 private51 public :: f152contains53 real function f1()54 end55 real function f2()56 end57end58 59!Expect: m3.mod60!module m361! private::f262!contains63! function f1()64! real(4)::f165! end66! function f2()67! real(4)::f268! end69!end70 71! Test optional dummy procedure72module m473contains74 subroutine s(f)75 interface76 logical recursive function f()77 implicit none78 end function79 end interface80 optional f81 end82end83 84!Expect: m4.mod85!module m486!contains87! subroutine s(f)88! optional::f89! interface90! recursive function f()91! logical(4)::f92! end93! end interface94! end95!end96