J3/06-331r4 To: J3 From: Dan Nagle Subject: List Processor Dependencies in an Annex Date: 2006 Nov 16 Dependencies: none OWGV is likely to recommend to language technical committees that an Annex describing processor dependencies be added to those standards currently lacking one. For example, please see C99 Annex J, page 487. The motivation is to aid applications programmers who want to know all possible differences between processors, to aid tool makers who want to know what might be indicated as possible variances between processors, and to aid compiler vendors who may be asked to provide options to allow various different allowed behavior. The C committee's liaison to OWGV reports that Annex J is helpful to the C community, and that the C committees have been praised for having added it and for maintaining it. This paper may not be complete, it is made by searching the 007r1 PDF for processor dependency and adding the page, line and a short description to an Annex to be added to 007r1. Thus, the edits here may be incomplete. Edits: (add the new annex to the table of contents) xi:[after Annex D] "Annex E (Informative) Processor Dependencies ... " (relabel the current Annex E) xi: change "E" to "F" (add the new annex to the document) [650+] starting a new page, add "Annex E (Informative) Processor Dependencies This annex collects some information about processor dependencies that appear in this part of ISO/IEC 1539. This part of ISO/IEC 1539 does not specify those properties listed in clause 1.4. Clause 1.5 describes certain error detection capabilities that a standard-conforming processor shall provide. This part of ISO/IEC 1539 does not require the processor to detect other violations of its requirements by a program. This part of ISO/IEC 1539 does not specify which additional intrinsic procedures or intrinsic modules a processor supports (1.5 Conformance). This part of ISO/IEC 1539 places no ordering requirement on the program units that constitute a program, but because the public portions of a module are required to be available by the time a module reference (11.2.2 The USE statement and use association) is processed, a processor may require a particular order of processing of the program units (2.2.2 Program). Whether an external file is available to all images or only to particular images is processor dependent (2.3.2 Program execution). A processor might allow the number of images to be chosen at compile time, link time, or run time. It might be the same as the number of CPUs but this is not required. Compiling for a single image might permit the optimizer to eliminate overhead associated with parallel execution. Portable programs should not make assumptions about the exact number of images. The maximum number of images may be limited due to architectural constraints. (Note 2.5). When a Fortran procedure is invoked, the specification expressions within the **specification-part** of the invoked procedure, if any, are evaluated in a processor dependent order (2.3.6 Execution sequence). What companion processors a processor has are not specified (2.5.10 Companion processors). The processor character set is processor dependent (3.1 Processor character set). The means for specifying the source form, free form or fixed form, of Fortran source are processor dependent (3.3 Source form). The maximum number of characters allowed on a free form source line containing characters not of default kind is processor dependent (3.3.1 Free source form). The maximum number of characters allowed on a fixed form source line containing characters not of default kind is processor dependent (3.3.2 Fixed source form). The maximum depth of nesting of include files is processor dependent, as is the interpretation of the **char-literal-constant** in the include line (3.4 Including source text). It is processor dependent whether comments in a macro definition appear in the expansion. It is processor dependent whether continuations and consecutive blanks that are not part of a token are preserved (3.5.2.1 General). If a statement contains any character that is not of default kind, the maximum number of characters allowed is processor dependent (3.5.2.1 General). The set of values supported by an intrinsic type, other than logical and bits, is processor dependent (4.1.1 Set of values). The representation methods (4.1.1 Set of values) and the kind type parameter values specifying a representation method supported by a processor is not specified by this part of ISO/IEC 1539. (4.2 Type parameters). The kind type parameter value of a character type length is processor dependent (4.4.5.1 Character sets). A processor may restrict some or all control characters from occurring in source when expressed in fixed source form (4.4.5.3 Character literal constant). The processor defines the collating sequence for each character set (4.4.5.4 Collating sequence). The upper limit of the size supported by the BITS type is processor dependent (4.4.7 Bits type). When several objects are finalized (4.5.6.3 When finalization occurs), the order of finalization is processor dependent (4.5.6.2 The finalization process). Whether finalization occurs for objects in modules or submodules when no active procedure references the module or submodule or for objects allocated via pointer allocation and all pointers have their allocation status changed so none of them point to the object any longer, is processor dependent. If finalization occurs, it is processor dependent when it occurs (4.5.6.3 When finalization occurs). If an object is not defined to be contiguous, or defined to be not contiguous, it is processor dependent whether it is contiguous (5.3.6 Contiguous attribute). A STAT= variable in an allocate statement (6.3.1 ALLOCATE statement) or a deallocate statement (6.3.3 DEALLOCATE statement) becomes defined with a processor-dependent positive value when an error occurs, likewise, a ERRMSG= variable becomes defined with a processor-dependent value when an error occurs. If an unsaved allocatable local variable of a module or submodule is allocated when execution of a RETURN or END statement results in no active scoping unit referencing the module or submodule, it is processor dependent whether the object retains its allocation status or is deallocated (6.3.3.1 Deallocation of allocatable variables). In relational expressions where both operands are integers with the same range but different kind type parameter values, or are any combination of real and complex with different kind type parameter values but the same precision, or when both operands are of type logical with different kind type parameter values, the kind type parameter value of the expression is processor dependent (7.1.4.2 Type, type parameters, and shape of the result of an operation). The precise details of the translations of numerical operations are specified in 7.1.8.4 Evaluation of numeric intrinsic operations. When performing array assignments, the processor may perform the element-by-element assignment in any order. When performing defined type assignments, the processor may perform the component-by-component assignment in any order or by any means that has the same effect (this is undetectable by a standard-conforming program) (7.4.1.3 Interpretation of intrinsic assignments). Execution of a BLOCK construct causes evaluation of the specification expressions within its specification-part in a processor-dependent order (8.1.4 BLOCK construct). Within a DO CONCURRENT construct, a pointer that has its pointer association changed in more than one iteration has an processor dependent association status when the construct terminates (8.1.7 DO construct). When an image is terminated by a STOP statement, its stop code, if any, is made available in a processor-dependent manner (8.4 STOP statement). If the STAT= or ERRMSG= specifier appears in a SYNC ALL, SYNC TEAM, SYNC IMAGES, SYNC MEMORY, NOTIFY, or QUERY statement and an error occurs during execution of one of these statements, the variable becomes defined with a processor-dependent positive integer value (8.5.7 STAT= and ERRMSG= specifiers in image execution control statements). Whether a processor allows a file to be viewed both as a record file and as a stream file is processor dependent; in this case the relationship between the file storage units when viewed as a stream file and the records when viewed as a record file is processor dependent (9 Input/output statements). A processor may prohibit some control characters from appearing in a formatted record or a formatted stream file (3.1 Processor character set and 9.1.1 Formatted record). At any time, there is a processor-dependent set of allowed access methods, a processor-dependent set of allowed forms, a processor-dependent set of allowed actions, and a processor-dependent set of allowed record lengths for a file (9.2 External files). The set of allowable names for a file is processor dependent (9.2 External files). When an external file is connected for formatted stream access, the relationship between positions of successive file storage units is processor dependent (9.2.2.3 Stream access). An asterisk identifies particular processor-dependent external units that are preconnected for formatted sequential access (9.5.4.2 Identifying a unit). These units are also identified by unit numbers defined by the named constants INPUT_UNIT and OUTPUT_UNIT of the ISO_FORTRAN_ENV module (13.8.3 The ISO_FORTRAN_ENV intrinsic module). This part of ISO/IEC 1539 identifies a processor-dependent external unit for the purpose of error reporting. This unit shall be preconnected for sequential formatted output. The processor may define this to be the same as the output unit identified by an asterisk. This unit is also identified by a unit number defined by the named constant ERROR_UNIT of the ISO_FORTRAN_ENV intrinsic module (13.8.3 The ISO_FORTRAN_ENV intrinsic module). At any time, there is a processor-dependent set of external units that exist for a program (9.4.2 Unit existence). Whether a unit may be connected to a file that is also connected to a C stream is processor dependent. If the processor allows a unit to be connected to a file that is also connected to a C stream, the results of performing input/output operations on such a file are processor dependent. It is processor dependent whether the files connected to the units INPUT_UNIT, OUTPUT_UNIT, and ERROR_UNIT correspond to the predefined C text streams standard input, standard output, and standard error. If a procedure defined by means of Fortran and a procedure defined by means other than Fortran perform input/output operations on the same external file, the results are processor dependent (9.4.3 Connection of a file to a unit). If the ACTION= specifier is omitted on the OPEN statement, the default value is processor dependent (9.4.5.2 ACTION= specifier in the OPEN statement). If the ENCODING= specifier is omitted in an OPEN statement that initiates a connection, the default value is DEFAULT, which is processor dependent (9.4.5.7 ENCODING= specifier in the OPEN statement). The name of a file opened with STATUS='SCRATCH' is processor dependent (9.4.5.8 FILE= specifier in the OPEN statement). The interpretation of case in a file name is processor dependent (9.4.5.8 FILE= specifier in the OPEN statement). The value returned to a variable in a NEWUNIT= specifier is processor dependent (9.4.5.10 NEWUNIT= specifier in the OPEN statement). The character used to pad short input records containing non-default characters is processor dependent (9.4.5.11 PAD= specifier in the OPEN statement). If the RECL= specifier is omitted for a file being connected for sequential access, the default value is processor dependent (9.4.5.13 RECL= specifier in the OPEN statement). When a record contains any nondefault characters, the appropriate value for the RECL= specifier is processor dependent (9.4.5.13 RECL= specifier in the OPEN statement). If the ROUND= specifier is omitted in an OPEN statement that initiates a connection, the I/O rounding mode is processor dependent (9.4.5.14 ROUND= specifier in the OPEN statement). If the SIGN= specifier is omitted in an OPEN statement that initiates a connection, the default value is processor dependent (9.4.5.15 SIGN= specifier in the OPEN statement). If STATUS='UNKNOWN' is specified in an OPEN statement, the status is processor dependent (9.4.5.16 STATUS= specifier in the OPEN statement). Successful execution of an asynchronous data transfer statement containing an ID= specifier causes the variable specified in the ID= specifier to become defined with a processor-dependent value (9.5.2.9 ID= specifier in a data transfer statement). Any type mismatch caused by unformatted input has a processor defined result (9.5.4.4.1 Unformatted data transfer). The units used for derived type transfers are processor dependent (9.5.4.7.2 User-defined derived-type input/output procedures). When an error occurs, the variable in IOSTAT= and IOMSG= specifiers return processor dependent values (9.10 Error, end-of-record, and end-of-file conditions). The action, if any, of a FLUSH statement is processor dependent (9.8 FLUSH statement). The case of letters returned by INQUIRE statements for the FILE= specifier is processor dependent (9.9.2.1 FILE= specifier in the INQUIRE statement). The variable in a POSITION= specifier in an INQUIRE statement becomes defined with a processor dependent value (9.9.2.22 POSITION= specifier in the INQUIRE statement). The value assigned to the variable in the INQUIRE statement SIZE= specifier is processor dependent (9.9.2.29 SIZE= specifier in the INQUIRE statement). The value assigned to the variable in a IOLENGTH= specifier is processor dependent (9.9 File inquiry statement). The set of error conditions in input/output statements is processor dependent (9.10 Error, end-of-record, and end-of-file conditions). During output to a Unicode file, if a character output list item or character string edit descriptor contains a character that is not representable in the ISO 10646 character type, the result is processor-dependent (10.7.1 General). On input, the interpretation of non-blank characters within the parentheses of a real NaN input field is processor dependent, and the processor may supply either a signaling NaN or a quiet NaN. The interpretation of a sign in a NaN input field is processor dependent (10.7.2.3.2 F editing). On output, the processor might print characters other than NaN or NaN() when the value is a NaN. Any non-blank characters between the parentheses are processor dependent (10.7.2.3.2 F editing). Unless the rounding mode is specified by an OPEN statement (9.4.5.14 ROUND= specifier in the OPEN statement), a data transfer input/output statement (9.5.2.13 ROUND= specifier in a data transfer statement), or an edit descriptor (10.8.7 RU, RD, RZ, RN, RC, and RP editing) it is processor dependent. When the rounding mode is processor dependent or nearest rounding mode, and the effect of the rounding in cases where two real values are equally valid, is processor dependent (10.7.2.3.7 Rounding mode). When a dummy argument does not have the target attribute, or does not match the actual argument in type, whether any pointers that are pointer associated with the actual argument are associated with the dummy is processor dependent (12.5.2.5 Ordinary dummy variables). If the dummy argument has the TARGET attribute and is an explicit-shape array, an assumed-shape array with the CONTIGUOUS attribute, or an assumed-size array, and the argument associated entity has the TARGET attribute but is not an array section with a vector subscript then (1) on invocation of the procedure, whether any pointers associated with the effective argument become associated with the corresponding dummy argument is processor dependent, and (2) when execution of the procedure completes, the pointer association status of any pointer that is pointer associated with the dummy argument is processor dependent (12.5.2.5 Ordinary dummy variables). If the dummy argument does not have the TARGET attribute, any pointers associated with the actual argument do not become associated with the corresponding dummy argument on invocation of the procedure. If such a dummy argument is used as an actual argument that is associated with a dummy argument with the TARGET attribute, whether any pointers associated with the original actual argument become associated with the dummy argument with the TARGET attribute is processor dependent (12.5.2.5 Ordinary dummy variables). The interface of a procedure defined by means other than Fortran may be specified by an interface body or procedure declaration statement. The means by which such a procedure is defined are processor dependent (12.6.3 Definition and invocation of procedures by means other than Fortran). The values returned by some intrinsic procedures are processor dependent approximations. If this is the case, it is noted in the description of each procedure (13 Intrinsic procedures and modules). If there is no default character corresponding to the ASCII character that is the value of the argument of the ACHAR function, the result is processor dependent (13.7.2 ACHAR). The extent to which a processor supports IEEE arithmetic is processor dependent (14 Exceptions and IEEE arithmetic). Specifically, whenever IEEE_VALUE returns a signaling NaN it is processor dependent whether or not invalid is raised and processor dependent whether or not the signaling NaN is converted into a quiet NaN (14.10.36 IEEE_VALUE). The sizes of the numeric storage unit, the character storage unit and the file storage unit are the value of constants in the ISO_FORTRAN_ENV intrinsic module; the size of an unspecified storage unit is not specified. For a BITS value with a kind equal to an integer multiple of the size of a numeric storage unit, the order of its storage units is processor dependent (16.5.3.2 Storage sequence)." (update annex letter of previous Annex E) [651] Change "Annex E" to "Annex F"