To: J3 09-191 From: R. Bader Subject: Question on assumed type entities Date: 2009 April 17 References: N1761 According to N1761, a dummy argument of assumed type may have the POINTER or ALLOCATABLE attribute. Consider the following code: module mod_assumed type :: foo : end type type, extends(foo) :: foo_ext : end type type :: bar : end type contains subroutine construct(this, len) type(*), allocatable :: this(:) integer, intent(in) :: len if (len == 1) allocate(this(1)) if (len == 2) allocate(foo :: this(2)) if (len == 3) allocate(foo_ext :: this(3)) if (len == 4) allocate(bar :: this(4)) end subroutine end module program p use mod_assumed type(foo), allocatable :: o1(:) class(foo), allocatable :: o2(:) call construct(o1, 1) deallocate(o1) call construct(o1, 2) deallocate(o1) call construct(o1, 3) deallocate(o1) call construct(o1, 4) deallocate(o1) call construct(o2, 1) deallocate(o2) call construct(o2, 2) deallocate(o2) call construct(o2, 3) deallocate(o2) end program p What are the definition status and values of o1 and o2, respectively, after each call to "construct", assuming each type component has a default initialization?