J3/06-162r1 Date: May 8, 2006 To: J3 From: JOR/Whitlock Title: Remove unnecessary I/O restriction Problem statement: According to the first paragraphs after NOTES 9.34 and 9.35 in subclause 9.5.2 [193:5,12], the following program does not conform to the 2003 standard: program P type :: T integer, allocatable :: I(:) end type T type(t) :: X allocate ( x%i(10) ) read *, x%i end program P The restriction against allocatable components in input/output lists or as namelist group objects is unnecessarily too strong. It would be sufficient to require them to be allocated. It isn't necessary to add anything to the definition of how a list is expanded into a sequence of effective list items because that definition depends upon "component order", which extends across pointer and allocatable components. Edits: The edits are against 04-007. [193:5,12][Editor: At the ends of the first paragraphs after NOTES 9.34 and 9.35 in subclause 9.5.2, replace "and shall not be pointers or allocatable" with ", shall not be pointers, and, if allocatable, shall be allocated".] [198:28][Editor: In the second paragraph of 9.5.3.6, replace "allocatable or a pointer" by "a pointer or a deallocated allocatable variable".] Response: The above program is standard-conforming. x%i is not a derived type; it is of type integer. If the program included read *,x that would be non-conforming. In order to accomplish this read, the user should define a UDTIO routine.