To: J3 Members J3/17-250r2 From: Daniel Chen Subject: C915 missing TEAM_TYPE Date: 2017 October 19 1. Discussion We prohibit type C_PTR or C_FUNPTR from the intrinsic module ISO_C_BINDING in multiple scenarios as they cannot be coarray. Since we disallow TEAM_TYPE being coarray in C823, we should add TEAM_TYPE. 2. Edits [xx] In Introduction, in the last bullet section of paragraph 2: "Changes to features previously described by ISO/IEC TS 18508:2015", at the end of the section, add a sentence: "A variable of type TEAM_TYPE may have a pointer component, and the effective uses of team variables are limited to the image where their values were computed." [75:2] 7.5.4.1 Component definition statement, in C748 after "ISO_C_BINDING" change "(18.3.3)" to "(18.2)" and add ", or of type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV (16.10.2)". {C748 now reads: C748 (R737) If a coarray-spec appears, the component shall not be of type C_PTR or C_FUNPTR from the intrinsic module ISO_C_BINDING (18.2), or of type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV (16.10.2).} [133:11] 9.4.2 Structure components, in C915 after "(18.2)" add ", or of type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV (16.10.2)". {C915 now reads: C915 A data-ref shall not be of type C_PTR or C_FUNPTR from the intrinsic module ISO_C_BINDING (18.2), or of type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV (16.10.2) if one of its part-refs has an image-selector.} [141:12-13] 9.7.1.1 Form of the ALLOCATE statement C937 Change "specify the type C_PTR" to "specify type C_PTR", and after "ISO_C_BINDING" add ", or type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV". {C937 now reads: C937 (R927) If an allocate-object is a coarray, type-spec shall not specify type C_PTR or C_FUNPTR from the intrinsic module ISO_C_BINDING, or type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV.} [141:28] 9.7.1.1 Form of the ALLOCATE statement C946 after "ISO_C_BINDING" add ", or TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV". {C946 now reads: C946 (R927) The declared type of source-expr shall not be C_PTR or C_FUNPTR from the intrinsic module ISO_C_BINDING, or TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV if an allocate-object is a coarray.} [142:9-10] 9.7.1.1 Form of the ALLOCATE statement change "EVENT_TYPE or LOCK_TYPE" to "EVENT_TYPE, LOCK_TYPE, or TEAM_TYPE" twice. {It now reads: If an ALLOCATE statement has a SOURCE= specifier and an allocate-object that is a coarray, source-expr shall not have a dynamic type of C_PTR or C_FUNPTR from the intrinsic module ISO_C_BINDING, or EVENT_TYPE, LOCK_TYPE, or TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV, or have a subcomponent whose dynamic type is EVENT_TYPE, LOCK_TYPE, or TEAM_TYPE.} [172:12] 10.2.1.3 Interpretation of intrinsic assignments, paragraph 12 after "ISO_C_BINDING" add ", or of the type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV". {It now reads: For an intrinsic assignment of the type C_PTR or C_FUNPTR from the intrinsic module ISO_C_BINDING, or of the type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV, the variable becomes undefined if the variable and expr are not on the same image.} [172: NOTE 10.41] 10.2.1.3 Interpretation of intrinsic assignments change "C_PTR or C_FUNPTR" to "C_PTR, C_FUNPTR or TEAM_TYPE" {NOTE 10.41 now reads: An intrinsic assignment statement for a variable of type C_PTR, C_FUNPTR or TEAM_TYPE is not permitted to involve a coindexed object, see C915, which prevents inappropriate copying from one image to another. However, such copying can occur as an intrinsic assignment for a component in a derived-type assignment.} [215:12-] At the end of 11.6.9 FORM TEAM statement, following the last Note (11.45), add a new Note: "Note 11.45+ The values of the team variables on the images of the team might differ between images. Usage of the value of a team variable should be limited to its own image." [445:34] In 16.10.2.32 TEAM_TYPE, in the first paragraph, delete ";no component is a pointer" {There is no longer a useful restriction.} [532:9] 19.6.6 Events that cause variables to become undefined, list item (25) after "ISO_C_BINDING" add ", or of the type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV,". {It now reads: (25) Execution of an intrinsic assignment of the type C_PTR, C_FUNPTR from the intrinsic module ISO_C_BINDING, or of the type TEAM_TYPE from the intrinsic module ISO_FORTRAN_ENV, in which the variable and expr are not on the same image causes the variable to become undefined.} ----------------------------------------------------------------------