program derived_types_03
implicit none

type :: X
    integer :: i
end type X

type(X) :: b


contains

subroutine Y()
type :: A
    integer :: i
end type A
type(A) :: b
end subroutine Y


integer function Z()
type :: A
    integer :: i
end type A
type(A) :: b
Z = 5
end function Z


end program derived_types_03
