From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3224 invoked by alias); 1 Oct 2010 15:55:36 -0000 Received: (qmail 3211 invoked by uid 22791); 1 Oct 2010 15:55:34 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_05 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Oct 2010 15:55:30 +0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45859] New: [Coarray, F2008, IR] Rejects valid actuals to coarray dummies X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 01 Oct 2010 15:55:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg00148.txt.bz2 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: unassigned@gcc.gnu.org ReportedBy: burnus@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