To: J3 10-210 From: R. Bader Subject: constraints on entities of type LOCK_TYPE Date: 2010 September 22 Reference: N1814 NUMBER: F08/xxxx TITLE: constraints on entities of type LOCK_TYPE KEYWORDS: locks, polymorphism DEFECT TYPE: Request for interpretation STATUS: J3 consideration in progress Consider the following type definition type :: m class(*), allocatable :: lock end type type(m) :: om[*] allocate(lock_type :: om%lock) and later call a subprogram with a type(m), intent(out) :: om[*] dummy argument, possibly further down the call stack. QUESTION: Is such a call standard conforming? DISCUSSION: According to constraint C1304, such a call is not allowed; the dummy object is required to have INTENT(INOUT). However, it appears that it may not be possible to check this at compile time. A similar issue may arise for C1303. The most appropriate solution may be to prohibit unlimited polymorphic entities to be allocated to an entity of type LOCK_TYPE. SUGGESTED EDIT: p399, add constraint C1302a An unlimited polymorphic entity shall not be of dynamic type LOCK_TYPE or one of its extensions SUBMITTED BY: R. Bader HISTORY: Submitted September 22, 2010