J3/14-164r1 To: J3 From: Van Snyder Subject: Interp concerning LOCK_TYPE and unlimited polymorphism Date: 2014 June 26 ---------------------------------------------------------------------- NUMBER: F08/0108 TITLE: LOCK_TYPE and unlimited polymorphic KEYWORD: LOCK_TYPE, unlimited polymorphic DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Assume type LOCK_TYPE from the intrinsic module ISO_Fortran_Env is available. Q1. Is allocation of X%C permitted? TYPE t TYPE(LOCK_TYPE),ALLOCATABLE :: c END TYPE TYPE(t) :: x[*],y[*] ALLOCATE(y%c) ALLOCATE(x%c,SOURCE=y%c) Q2. Is allocation of C permitted? class(*), pointer :: C type(lock_type), intent(in) :: L[*] allocate ( C, source=L ) Q3. Is allocation of C permitted? class(*), pointer :: C allocate ( LOCK_TYPE :: C ) Q4. Is pointer assignment to C permitted? class(*), pointer :: C type(lock_type), intent(in), target :: L[*] c => L ANSWER: A1. Allocation of X%C is not intended to be allowed. An edit is supplied to correct the requirements on allocation of LOCK_TYPE. A2. Allocation of C is not intended to be allowed. An edit is supplied to correct the requirements on allocation of LOCK_TYPE. A3. This allocation of C is permitted. A4. Pointer assignment to C is permitted. EDITS: [129:9-10] 6.7.1.1 Syntax, C643, Change "C_PTR," to "C_PTR or" Delete ", LOCK_TYPE ... LOCK_TYPE". [129:10+] Insert new constraint "C643a (R627) The declared type of shall not be LOCK_TYPE or have a subcomponent of type LOCK_TYPE." SUBMITTED BY: Van Snyder HISTORY: m204 14-164 F08/0108 submitted m204 14-164r1 Revised question, answers and edits. ----------------------------------------------------------------------