From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31740 invoked by alias); 2 Apr 2013 08:02: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 Received: (qmail 31697 invoked by uid 48); 2 Apr 2013 08:01:53 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56808] New: Coarray: Wrongly accepts coindexed arguments to INTENT(OUT) dummies Date: Tue, 02 Apr 2013 08:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: accepts-invalid 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 X-SW-Source: 2013-04/txt/msg00072.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56808 Bug #: 56808 Summary: Coarray: Wrongly accepts coindexed arguments to INTENT(OUT) dummies Classification: Unclassified Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: accepts-invalid Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: burnus@gcc.gnu.org Found at https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.fortran/-oUZRIdRCcg For obvious reasons, the following is invalid, but it is accepted: "If the actual argument is a coindexed object with an allocatable ultimate component, the dummy argument shall have the INTENT (IN) or the VALUE attribute." (12.5.2.4 Ordinary dummy variables) real(kind=4),allocatable :: grt(:,:,:)[:,:,:] call cgca_rt(grt(i,:,:)[1,1,1]) contains subroutine cgca_rt(r) real(kind=4),intent(out) :: r(3,3) end end