86 lines · plain
1! RUN: %python %S/test_modfile.py %s %flang_fc12module m13 type foo4 integer :: c1 = 1235 end type6end7 8module m29 use m1, only: foo10 type baz11 type(foo) :: d = foo()12 end type13 type bar14 type(baz) :: e = baz()15 end type16end17 18module m319 use m1, only: m1foo => foo20 type foo21 type(m1foo), private :: c2 = m1foo()22 end type23end24 25module m426 use m2, only: m3foo => foo27 type foo28 type(m3foo), private :: c3 = m3foo()29 end type30end31 32module m533 use m2, only: m2bar => bar34 use m4, only: foo35 type blah36 type(m2bar) :: f = m2bar()37 end type38end39 40!Expect: m1.mod41!module m142!type::foo43!integer(4)::c1=123_444!end type45!end46 47!Expect: m2.mod48!module m249!use m1,only:foo50!type::baz51!type(foo)::d=foo(c1=123_4)52!end type53!type::bar54!type(baz)::e=baz(d=foo(c1=123_4))55!end type56!end57 58!Expect: m3.mod59!module m360!use m1,only:m1foo=>foo61!type::foo62!type(m1foo),private::c2=m1foo(c1=123_4)63!end type64!end65 66!Expect: m4.mod67!module m468!use m2,only:m3foo=>foo69!type::foo70!type(m3foo),private::c3=m3foo(c1=123_4)71!end type72!end73 74!Expect: m5.mod75!module m576!use m2,only:m2$foo=>foo77!use m2,only:baz78!use m2,only:m2bar=>bar79!use m4,only:foo80!private::m2$foo81!private::baz82!type::blah83!type(m2bar)::f=m2bar(e=baz(d=m2$foo(c1=123_4)))84!end type85!end86