brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 13ed0c7 Raw
56 lines · plain
1! RUN: %python %S/test_modfile.py %s %flang_fc12! Ensure that interfaces, which are internal to procedures and are used to3! define the interface of dummy or return value procedures, are included in4! .mod files.5module m6  implicit none7contains8  function f(x)9    real, intent(in) :: x10    abstract interface11       subroutine used_int(x, p)12         implicit none13         real, intent(out) :: x14         interface15            subroutine inner_int(x)16              implicit none17              real, intent(out) :: x18            end subroutine inner_int19         end interface20         procedure(inner_int) :: p21       end subroutine used_int22 23       pure logical function unused_int(i)24         implicit none25         integer, intent(in) :: i26       end function unused_int27    end interface28    procedure(used_int), pointer :: f29 30    f => null()31  contains32    subroutine internal()33    end subroutine internal34  end function f35end module m36 37!Expect: m.mod38!module m39!contains40!function f(x)41!real(4),intent(in)::x42!abstract interface43!subroutine used_int(x,p)44!real(4),intent(out)::x45!interface46!subroutine inner_int(x)47!real(4),intent(out)::x48!end49!end interface50!procedure(inner_int)::p51!end52!end interface53!procedure(used_int),pointer::f54!end55!end56