------- Comment #1 from burnus at gcc dot gnu dot org 2008-01-15 14:04 ------- >From the Fortran 2003 standard ("12.4.1.2 Actual arguments associated with dummy data objects")
"If the actual argument is scalar, the corresponding dummy argument shall be scalar unless the actual argument is of type default character, of type character with the C character kind (15.1), or is an element or substring of an element of an array that is not an assumed-shape or pointer array. If the procedure is nonelemental and is referenced by a generic name or as a defined operator or defined assignment, the ranks of the actual arguments and corresponding dummy arguments shall agree. If a dummy argument is an assumed-shape array, the rank of the actual argument shall be the same as the rank of the dummy argument; the actual argument shall not be an assumed-size array (including an array element designator or an array element substring designator)." In the example posted, the array is of DEFERRED type and not an ASSUMED-SHAPE array and thus the first part of the last paragraph does not apply. As DEFERRED arrays are also not forbidden in the paragraph before, they are allowed. Thus only a) pointer arrays (dummy or not) b) assumed-shape array (which are dummy arguments) should be rejected as they might have strides and thus accessing the next byte in memory might leave the array. -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |burnus at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2008-01-15 14:04:49 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34796