From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10097 invoked by alias); 27 Oct 2011 23:29:46 -0000 Received: (qmail 9976 invoked by uid 22791); 27 Oct 2011 23:29:45 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp25.services.sfr.fr (HELO smtp25.services.sfr.fr) (93.17.128.120) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Oct 2011 23:29:31 +0000 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2512.sfr.fr (SMTP Server) with ESMTP id C37AA7000055; Fri, 28 Oct 2011 01:29:30 +0200 (CEST) Received: from gimli.local (145.15.72.86.rev.sfr.net [86.72.15.145]) by msfrf2512.sfr.fr (SMTP Server) with ESMTP id 89F92700004E; Fri, 28 Oct 2011 01:29:30 +0200 (CEST) X-SFR-UUID: 20111027232930565.89F92700004E@msfrf2512.sfr.fr Content-Type: multipart/mixed; boundary="===============9033859735490719748==" MIME-Version: 1.0 From: Mikael Morin To: gfortran , GCC patches Message-ID: <20111027232930.18581.39778@gimli.local> In-Reply-To: <20111027232908.18581.12145@gimli.local> References: <20111027232818.18581.901@gimli.local> <20111027232908.18581.12145@gimli.local> Subject: [Patch, fortran] [10/66] inline sum and product: Preliminary cleanups: Use array's instead of loop's dimensions. Date: Thu, 27 Oct 2011 23:31:00 -0000 X-IsSubscribed: yes 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 X-SW-Source: 2011-10/txt/msg02527.txt.bz2 --===============9033859735490719748== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-length: 0 --===============9033859735490719748== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr43829-10.CL" Content-length: 164 2011-10-19 Mikael Morin * trans-array.c (gfc_conv_ss_startstride): Access array bounds along array dimensions instead of loop dimensions. --===============9033859735490719748== Content-Type: text/x-diff; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr43829-10.patch" Content-length: 613 diff --git a/trans-array.c b/trans-array.c index 8359af2..f4d8a85 100644 --- a/trans-array.c +++ b/trans-array.c @@ -3347,9 +3347,11 @@ done: case GFC_SS_FUNCTION: for (n = 0; n < ss->data.info.dimen; n++) { - ss->data.info.start[n] = gfc_index_zero_node; - ss->data.info.end[n] = gfc_index_zero_node; - ss->data.info.stride[n] = gfc_index_one_node; + int dim = ss->data.info.dim[n]; + + ss->data.info.start[dim] = gfc_index_zero_node; + ss->data.info.end[dim] = gfc_index_zero_node; + ss->data.info.stride[dim] = gfc_index_one_node; } break; --===============9033859735490719748==--