From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9423 invoked by alias); 13 Jun 2007 18:04:08 -0000 Received: (qmail 9363 invoked by uid 48); 13 Jun 2007 18:03:56 -0000 Date: Wed, 13 Jun 2007 18:04:00 -0000 Message-ID: <20070613180356.9362.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/32323] Accepts invalid vector subscript actual argument for intent(out) dummy argument In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" 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: 2007-06/txt/msg01038.txt.bz2 ------- Comment #1 from burnus at gcc dot gnu dot org 2007-06-13 18:03 ------- Thanks for finding this bug! I think it is the following in the Fortran 2003 standard: "12.4.1.2 Actual arguments associated with dummy data objects" "If a nonpointer dummy argument has INTENT (OUT) or INTENT (INOUT), the actual argument shall be definable." "If the actual argument is an array section having a vector subscript, the dummy argument is not definable and shall not have the INTENT (OUT), INTENT (INOUT), VOLATILE, or ASYNCHRONOUS attributes." Thus we also also need to check for VOLATILE instead of INTENT(IN)/INTENT(INOUT). Note that array sections without vector subscripts such as call aa(w(3:1)) are allowed! -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC host triplet|x86_64-unknown-linux-gnu | Keywords| |accepts-invalid Last reconfirmed|0000-00-00 00:00:00 |2007-06-13 18:03:56 date| | Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32323