From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18850 invoked by alias); 8 Jun 2004 22:44:19 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 18832 invoked from network); 8 Jun 2004 22:44:18 -0000 Received: from unknown (HELO colossus.systems.pipex.net) (62.241.160.73) by sourceware.org with SMTP; 8 Jun 2004 22:44:18 -0000 Received: from nowt.org (81-178-225-237.dsl.pipex.com [81.178.225.237]) by colossus.systems.pipex.net (Postfix) with ESMTP id 789C91C00096; Tue, 8 Jun 2004 23:44:16 +0100 (BST) Received: from wren.home (wren.home [192.168.1.7]) by nowt.org (Postfix) with ESMTP id 0A39DAC92; Tue, 8 Jun 2004 23:44:14 +0100 (BST) From: Paul Brook Organization: CodeSourcery To: fortran@gcc.gnu.org Subject: Re: [gfortran] Fix PR 13201 Date: Tue, 08 Jun 2004 23:54:00 -0000 User-Agent: KMail/1.6.2 Cc: Tobias =?iso-8859-1?q?Schl=FCter?= , patch References: <40BB9B70.1080807@physik.uni-muenchen.de> In-Reply-To: <40BB9B70.1080807@physik.uni-muenchen.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406082344.14900.paul@codesourcery.com> X-SW-Source: 2004-06/txt/msg00467.txt.bz2 > 2004-05-31 Tobias Schlueter > > PR fortran/13201 > * resolve.c (resolve_symbol): Fix coding style issue. Don't > allow parameter arrays with deferred shape. > > > Index: resolve.c > =================================================================== > RCS file: /cvs/gcc/gcc/gcc/fortran/resolve.c,v > retrieving revision 1.4 > diff -u -p -r1.4 resolve.c > --- resolve.c 18 May 2004 00:48:04 -0000 1.4 > +++ resolve.c 31 May 2004 20:37:00 -0000 > @@ -3736,9 +3736,17 @@ resolve_symbol (gfc_symbol * sym) > > || sym->as->type == AS_ASSUMED_SHAPE) > > && sym->attr.dummy == 0) > { > - gfc_error("Assumed %s array at %L must be a dummy argument", > - sym->as->type == AS_ASSUMED_SIZE ? "size" : "shape", > - &sym->declared_at); > + gfc_error ("Assumed %s array at %L must be a dummy argument", > + sym->as->type == AS_ASSUMED_SIZE ? "size" : "shape", > + &sym->declared_at); > + return; > + } > + > + if (sym->attr.flavor == FL_PARAMETER > + && sym->as != NULL && sym->as->type == AS_DEFERRED) > + { > + gfc_error ("No shape specified for parameter array '%s' declared > at %L", > + sym->name, &sym->declared_at); > return; > } I'd prefer it if the message was change to "Parameter '%s' at %L must have constant shape" For consistency with other errors. Other than that, Ok. We also need to reject automatic arrays. I've modified the PR accordingly. Paul