To: J3 J3/19-242 From: Malcolm Cohen Subject: FORM TEAM and invalid NEW_INDEX= values Date: 2019-October-15 Reference: 19-181 1. Introduction Paper 19-181 contains five purported interpretation requests glommed into a single paper. This paper discusses the third of them. 2. The alleged problem From 19-181: QUESTION 3: What happens if a new team was intended to have 16 images, one of these images has failed, and an active image of the new team specified 16 as its NEW_INDEX value? ANSWER 3: This would be an error condition because the new team has 15 images. If no image in the team has stopped and the FORM TEAM statement has a STAT= specifier, the variable specified will be given a processor-dependent value other than STAT_STOPPED_IMAGE and STAT_FAILED_IMAGE. This follows from the rules in 11.6.11, p5. 3. Response from /INTERP The question is uninteresting and the answer is simply wrong. The question is uninteresting because the standard does not support Fortran processors with mental telepathic powers. Thus the "if a new team was intended to have 16 images" condition has no meaning. The Fortran standard cannot be applied to the thought processes of any programmer (except possibly as a blunt object). Therefore the question boils down to "what happens if a NEW_INDEX= value is out of range". This question is directly answered by the standard: it requires of each NEW_INDEX= value that "It shall be ...less than or equal to the number of images in the team" As the program would not satisfy this condition, it thereby does not conform to the standard, and so the standard specifies no semantics for the program. The answer is thus wrong because the standard does not state that a NEW_INDEX= value of 16 in a team of 15 images is an "error condition". There is no requirement whatsoever on the behaviour of a Fortran processor that is faced with such a non-conforming program. As the standard does not determine the behaviour of a non-conforming program, /INTERP therefore declines to accept the question. 4. Future considerations If it is considered desirable for a Fortran program that executes with an out-of-range NEW_INDEX= value to be treated as conforming, i.e. raising an error condition, the text in 11.6.9 would need to be revised, and a new STAT_NEW_INDEX_OUT_OF_RANGE named constant should probably be created in ISO_FORTRAN_ENV. This paper does not advocate such a change, nor does it argue against it. However, such a change would be a new feature, and should therefore be processed as a new feature request, not an interpretation request. ===END===