From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6065 invoked by alias); 19 Jul 2007 08:31:08 -0000 Received: (qmail 6012 invoked by uid 48); 19 Jul 2007 08:30:57 -0000 Date: Thu, 19 Jul 2007 08:31:00 -0000 Message-ID: <20070719083057.6011.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/32804] ISO C Binding: C_LOC argument checking needs improvement 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-07/txt/msg01987.txt.bz2 ------- Comment #1 from burnus at gcc dot gnu dot org 2007-07-19 08:30 ------- For the accept-invalid part (c_loc of an assumed-shape array). The standard says: "X shall either (1) have interoperable type and type parameters and be (a) a variable that has the TARGET attribute and is interoperable," This variable has the TARGET attribute, but is not interoperable: "An array Fortran variable is interoperable if its type and type parameters are interoperable and it is of explicit shape or assumed size." Thus this error by NAG f95 is ok; however, as it is accepted by ifort, g95 and (currently) gfortran. As I completely fail to see any valid use of it and see several cases where it seems to work but one uses in reality the wrong array element, I favour to not allowing it even for -std=gnu. But if one finds a valid use, I'm also fine with an error only for -std=f2003. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32804