J3/10-172 To: J3 From: Malcolm Cohen Subject: Interp on DO CONCURRENT. Date: 2010 June 02 ---------------------------------------------------------------------- NUMBER: TITLE: DO CONCURRENT and file i/o. KEYWORDS: DO CONCURRENT DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: The standard states that "An input/output statement shall not write data to a file record or position in one iteration and read from the same record or position in a different iteration." In the loop DO CONCURRENT (i=1:2) IF (i==1) READ(17,REC=100) x ! (a) IF (i==2) WRITE(17,REC=100) y ! (b) END DO The input/output statement at (a) only reads data from the file, it does not write it, and thus fall foul of this restriction. Similar reasoning shows that the input/output statement at (b) also obeys this restriction. Is this fragment intended to be standard-conforming? ANSWER: No, the example is not intended to be standard-conforming. An edit is supplied to make the requirement less ambiguous. EDITS to 10-007: [178:15-16] In 8.1.6.7p1, penultimate bullet point, replace the whole sentence "An input/output ... iteration." with "If data are written to a file record or position in one iteration, that record or position in that file shall not be read from in a different iteration." SUBMITTED BY: Malcolm Cohen HISTORY: 10-172 m192 Submitted ----------------------------------------------------------------------