From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36935 invoked by alias); 10 May 2015 22:08:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 36912 invoked by uid 89); 10 May 2015 22:08:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: cc-smtpout1.netcologne.de Received: from cc-smtpout1.netcologne.de (HELO cc-smtpout1.netcologne.de) (89.1.8.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 10 May 2015 22:08:40 +0000 Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id 96830123DB; Mon, 11 May 2015 00:08:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin3.netcologne.de (Postfix) with ESMTP id 8E51B11D49; Mon, 11 May 2015 00:08:36 +0200 (CEST) Received: from [78.35.187.187] (helo=cc-smtpin3.netcologne.de) by localhost with ESMTP (eXpurgate 4.0.7) (envelope-from ) id 554fd6e4-0b62-7f0000012729-7f000001e912-1 for ; Mon, 11 May 2015 00:08:36 +0200 Received: from [192.168.178.20] (xdsl-78-35-187-187.netcologne.de [78.35.187.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by cc-smtpin3.netcologne.de (Postfix) with ESMTPSA; Mon, 11 May 2015 00:08:34 +0200 (CEST) Message-ID: <554FD6E1.8090202@netcologne.de> Date: Sun, 10 May 2015 22:08:00 -0000 From: Thomas Koenig User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: fortran@gcc.gnu.org CC: gcc-patches , Mikael Morin Subject: Re: [Patch, Fortran] Simplify lbound References: <553B7BA4.6040103@netcologne.de> <553BD925.3050401@sfr.fr> <553E83B4.8020005@netcologne.de> <5542722E.3030307@sfr.fr> <5543EA34.6060304@sfr.fr> <5546872F.7040507@netcologne.de> <554F640D.5020506@sfr.fr> In-Reply-To: Content-Type: multipart/mixed; boundary="------------010104060209050900030509" X-SW-Source: 2015-05/txt/msg00872.txt.bz2 This is a multi-part message in MIME format. --------------010104060209050900030509 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 878 Am 10.05.2015 um 22:43 schrieb H.J. Lu: >> Here is what I have committed. >> > > It caused: > > /export/gnu/import/git/sources/gcc/gcc/testsuite/gfortran.dg/inline_matmul_3.f90:38:39: > Error: Variable 'c1' cannot appear in the expression at (1)^M I know that error message, I got it when developing the inline matmul patches with the same test cases. I had a fix for this error message in one of my matmul patches, but it was removed in the review process because it could no longer be reproduced. So, here is the fix again. I think it is close to obvious (since it fixes the problem and can obviously do no harm), but anyway: OK for trunk? Regards Thomas 2015-05-10 Thomas Koenig PR fortran/66041 PR fortran/37131 * gfortran.h (gfc_array_spec): Add field resolved. * array.c (gfc_resolve_array_spec): Resolve array spec only once. --------------010104060209050900030509 Content-Type: text/x-patch; name="p-fix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p-fix.diff" Content-length: 866 Index: array.c =================================================================== --- array.c (Revision 222984) +++ array.c (Arbeitskopie) @@ -338,6 +338,9 @@ gfc_resolve_array_spec (gfc_array_spec *as, int ch if (as == NULL) return true; + if (as->resolved) + return true; + for (i = 0; i < as->rank + as->corank; i++) { e = as->lower[i]; @@ -364,6 +367,8 @@ gfc_resolve_array_spec (gfc_array_spec *as, int ch } } + as->resolved = true; + return true; } Index: gfortran.h =================================================================== --- gfortran.h (Revision 222984) +++ gfortran.h (Arbeitskopie) @@ -1002,6 +1002,8 @@ typedef struct bool cp_was_assumed; /* AS_ASSUMED_SIZE cp arrays are converted to AS_EXPLICIT, but we want to remember that we did this. */ + + bool resolved; } gfc_array_spec; --------------010104060209050900030509--