http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57458
Bug ID: 57458 Summary: TS29113: Wrongly rejects noncontiguous argument to assumed-rank when both are volatile/asynchronous Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Fortran 2008 has: 'C1239 (R1223) If an actual argument is a nonpointer array that has the ASYNCHRONOUS or VOLATILE attribute but is not simply contiguous (6.5.4), and the corresponding dummy argument has either the VOLATILE or ASYNCHRONOUS attribute, that dummy argument shall be an assumed-shape array that does not have the CONTIGUOUS attribute.' 'C1240 (R1223) If an actual argument is an array pointer that has the ASYNCHRONOUS or VOLATILE attribute but does not have the CONTIGUOUS attribute, and the corresponding dummy argument has either the VOLATILE or ASYNCHRONOUS attribute, that dummy argument shall be an array pointer or an assumed-shape array that does not have the CONTIGUOUS attribute.' TS29113 changes that as follows (pp.36f): '{In 12.5.2.4 Ordinary dummy variables, paragraph 18, constraint C1239} Change "or an assumed-shape ... attribute" to ", an assumed-shape array without the CONTIGUOUS attribute, or an assumed-rank array without the CONTIGUOUS attribute".' '{In 12.5.2.4 Ordinary dummy variables, paragraph 18, constraint C1240} Change "or an assumed-shape ... attribute" to ", an assumed-shape array without the CONTIGUOUS attribute, or an assumed-rank array without the CONTIGUOUS attribute". The edit has not yet been implemented as the following bogus error message shows: call foo2(i) 1 Error: Dummy argument 'x' has to be a pointer or assumed-shape array without CONTIGUOUS attribute - as actual argument at (1) is not simply contiguous and both are ASYNCHRONOUS or VOLATILE integer, pointer, asynchronous :: i(:) call foo(i) contains subroutine foo(x) type(*), dimension(:), asynchronous :: x end subroutine foo subroutine foo2(x) type(*), dimension(..), asynchronous :: x end subroutine foo2 end