From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30156 invoked by alias); 13 May 2009 17:16:03 -0000 Received: (qmail 30084 invoked by uid 48); 13 May 2009 17:15:47 -0000 Date: Wed, 13 May 2009 17:16:00 -0000 Message-ID: <20090513171547.30083.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/40039] Procedures as actual arguments: Check intent of arguments In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "janus 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: 2009-05/txt/msg01129.txt.bz2 ------- Comment #3 from janus at gcc dot gnu dot org 2009-05-13 17:15 ------- > FAIL: gfortran.dg/interface_19.f90 -O0 (test for excess errors) > FAIL: gfortran.dg/proc_ptr_result_1.f90 -O0 (test for excess errors) > > The last of these three test cases is probably invalid, the second failure > seems to be a problem with intrinsics, and about the first one I'm not sure. For intrinsics, the intent of the arguments is currently not considered at all. We need gfc_intrinsic_arg to have an 'intent' member. The F03 standard says: The dummy arguments of the specific intrinsic procedures in 13.6 have INTENT(IN). The dummy arguments of the generic intrinsic procedures in 13.7 have INTENT(IN) if the intent is not stated explicitly. The test case proc_ptr_result_1.f90 is invalid indeed. Relevant quote from the standard: Section 5.1.2.7: INTENT (INOUT) is not equivalent to omitting the INTENT attribute. The argument corresponding to an INTENT (INOUT) dummy argument always shall be definable, while an argument corresponding to a dummy argument without an INTENT attribute need be definable only if the dummy argument is actually redefined. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40039