PROGRAM cast_minimain

USE cast_mini

IMPLICIT NONE

CLASS(ExtList_T), POINTER  :: ptr_ext
CLASS(FurList_T), POINTER  :: ptr_fur
CLASS(List_T), POINTER  :: ptr_lst

TYPE(FurList_T), POINTER  :: typ_fur

ptr_lst => typ_fur
ptr_ext => typ_fur
ptr_fur => typ_fur

ptr_fur => Cast_AnyFur(ptr_lst)
ptr_fur => Cast_AnyFur(ptr_ext)

NULLIFY(ptr_lst)

ptr_fur => Cast_AnyFur(ptr_lst)

PRINT *, "Associated? ", ASSOCIATED(ptr_fur), ASSOCIATED(ptr_lst)

END PROGRAM cast_minimain
