J3/99-146r1 Date: 27th May 1999 To: J3 From: Malcolm Cohen Subject: Unresolved issue 9 1. Introduction In issue 9 Richard Maine makes 2 suggestions: (1) allowing initialisation of objects containing allocatable components (at least to NULL()) and (2) allowing PARAMETERs of these types. I concur. Since this makes TYPE T2 REAL,ALLOCATABLE :: X END TYPE TYPE(T2) :: V => T(NULL()) legal, perhaps TYPE T REAL,ALLOCATABLE :: X => NULL() END TYPE should be legal also (for consistency)? On the other hand, this adds no functionality at all and is an entirely redundant initialization, so I propose NOT adding it. If it is required, edits are required to [43:30-34] at least. 2. A related issue This was just unresolved issue 10, so it is already in the document. 3. Edits Comments on each edit appear in {}. {Allow intrinsic structure constructors for things with alloc comps} [62:37-39] Delete. {Alter constraint to allow parameters of d.t.s with alloc comps} [70:32-33] Delete "a derived-type ... allocatable," {Alter constraint to allow d.t.s with alloc comps to be initialised} [71:18-19] Delete "a derived-type ... allocatable," {Delete J3 note} [71:21-41] Delete. {Alter constraint to allow for allocatables} [71:18] Delete "an allocatable variable,". {Alter another constraint to allow for allocatables} [71:42-43] After "shall have the" insert "ALLOCATABLE or". After "shall not have the" insert insert "ALLOCATABLE or". {Fix text to allow, and provide semantics for, initialization of allocatables} [73:29-30] Replace first sentence with "If is a pointer and is =>NULL(), the initial association status of the pointer is disassociated. If is allocatable and is =>NULL(), the initial allocation status of the allocatable object is confirmed to be not allocated.". {Note that the previous text had a requirement duplicating part of the constraint 71:42-43; I have removed this duplicate requirement.} {Allow d.t.s with alloc comps to be init'ed in DATA} [93:43-44] Delete. {Require structure constructors for such things to have NULL() for the alloc comps} [94:31-32] Change "each component shall be an initialization expression" to "it shall be an initialization expression". {Allow NULL() for allocatable components in structure constructors to be considered to be "constant" expressions.} [141:37] After "each" insert "nonallocatable". Replace "no component ... attribute" with "each corresponding to an allocatable component is a reference to the transformational intrinsic function NULL". {The same for initialization expressions.} [143:1-2] After "each" insert "nonallocatable". Replace "no component ... attribute" with "each corresponding to an allocatable component is a reference to the transformational intrinsic function NULL".