55 lines · plain
1! RUN: %python %S/test_modfile.py %s %flang_fc12! Ensure that m2.mod explicitly USEs a generic interface from m13! so it can utilize its shadowed derived type.4module m15 implicit none6 type :: xyz7 integer :: n8 end type9 interface xyz10 module procedure xzy11 end interface12 contains13 function xzy(j) result(res)14 integer, intent(in) :: j15 type(xyz) :: res16 res%n = j17 end function18end module19 20!Expect: m1.mod21!module m122!type::xyz23!integer(4)::n24!end type25!interface xyz26!procedure::xzy27!end interface28!contains29!function xzy(j) result(res)30!integer(4),intent(in)::j31!type(xyz)::res32!end33!end34 35module m236 implicit none37 contains38 function foo(j) result(res)39 use :: m1, only: xyz40 integer, intent(in) :: j41 type(xyz) :: res42 res = xyz(j)43 end function44end module45 46!Expect: m2.mod47!module m248!contains49!function foo(j) result(res)50!use m1,only:xyz51!integer(4),intent(in)::j52!type(xyz)::res53!end54!end55