1module test 2 3 type, abstract :: atype 4 contains 5 procedure(suba), deferred :: add 6 end type 7 type, abstract, extends(atype) :: btype 8 end type 9 10 abstract interface 11 subroutine suba(self, b) 12 use, intrinsic :: iso_c_binding 13 import :: atype 14 import btype 15 implicit none 16 integer c, d 17 class(atype) :: self, b 18 end subroutine 19 end interface 20 21end module test 22