http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45859
Summary: [Coarray, F2008, IR] Rejects valid actuals to coarray dummies Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org Blocks: 18918,39627 The discussion has started at http://j3-fortran.org/pipermail/j3/2010-September/003862.html and lead to the following interpretation request (no link as the mail archive lags behind). The program interface subroutine sub (x) real x(10)[*] end subroutine end interface real :: x(100)[*] call sub (x(10)) end is supposed to be valid according the following IR. A modified program which uses call sub (x(10:)) is unambiguously valid. However, both programs are rejected by: call sub (x(10)) 1 Error: Actual argument to 'x' at (1) must be a coarray and thus shall not have an array designator ------------------------------------------------------ To: J3 10-xxx From: John Reid Subject: F2008 interp re sequence association for coarrays Date: 2010 October 1 NUMBER: F08/xxxx TITLE: Sequence association for coarrays KEYWORDS: sequence association, coarrays DEFECT TYPE: Erratum STATUS: J3 consideration in progress QUESTION: Was the text in 12.5.2.8: "If the dummy argument is an array coarray that has the CONTIGUOUS attribute or is not of assumed shape, the corresponding actual argument shall be simply contiguous." intended to disallow sequence association for coarrays, as illustrated by the example interface subroutine sub (x) real x(10)[*] end subroutine end interface ... real :: x(100)[*] ... call sub (x(10)) ANSWER: No. This restriction contradicts 12.5.2.4 paragraph 13, which allows the example program. An edit is supplied to correct this. EDIT: In 12.5.2.8 Coarray dummy variables, at the end of paragraph 2, add "or an element of a simply contiguous array". SUBMITTED BY: John Reid