From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8899 invoked by alias); 9 Jun 2004 12:38:10 -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 8835 invoked from network); 9 Jun 2004 12:38:06 -0000 Received: from unknown (HELO geburtsjahr.neunzehnhunderteinundachtzig.de) (217.160.92.50) by sourceware.org with SMTP; 9 Jun 2004 12:38:06 -0000 Received: from bauernhof (pD9EBF3D1.dip.t-dialin.net [217.235.243.209]) by geburtsjahr.neunzehnhunderteinundachtzig.de (Postfix) with ESMTP id A60FF8FC72; Wed, 9 Jun 2004 14:38:28 +0200 (CEST) Received: from physik.uni-muenchen.de (unknown [192.168.1.6]) by bauernhof (Postfix) with ESMTP id 7E16063151; Wed, 9 Jun 2004 14:37:43 +0200 (CEST) Message-ID: <40C70490.3000300@physik.uni-muenchen.de> Date: Wed, 09 Jun 2004 14:00:00 -0000 From: =?ISO-8859-1?Q?Tobias_Schl=FCter?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040506 MIME-Version: 1.0 To: Paul Brook Cc: fortran@gcc.gnu.org, patch Subject: Re: [gfortran] Fix PR 13201 References: <40BB9B70.1080807@physik.uni-muenchen.de> <200406082344.14900.paul@codesourcery.com> In-Reply-To: <200406082344.14900.paul@codesourcery.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00514.txt.bz2 Here's what I committed. I changed the check to "sym->as->type != AS_EXPLICIT", as this seems correct and caused no adverse effects. I also fixed an additional typo in the comment directly following. - Tobi 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 9 Jun 2004 12:30:29 -0000 @@ -3736,14 +3736,22 @@ 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_EXPLICIT) + { + gfc_error ("Parameter array '%s' at %L must have an explicit shape", + sym->name, &sym->declared_at); return; } /* Make sure that character string variables with assumed length are - dummy argument. */ + dummy arguments. */ if (sym->attr.flavor == FL_VARIABLE && !sym->attr.result && sym->ts.type == BT_CHARACTER