From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30210 invoked by alias); 27 Oct 2011 23:33:06 -0000 Received: (qmail 24185 invoked by uid 22791); 27 Oct 2011 23:32:12 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,TW_TM 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:31:58 +0000 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2512.sfr.fr (SMTP Server) with ESMTP id A9EEE7000040; Fri, 28 Oct 2011 01:31:57 +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 704BD70000AC; Fri, 28 Oct 2011 01:31:57 +0200 (CEST) X-SFR-UUID: 20111027233157460.704BD70000AC@msfrf2512.sfr.fr Content-Type: multipart/mixed; boundary="===============9155523510653111715==" MIME-Version: 1.0 From: Mikael Morin To: gfortran , GCC patches Message-ID: <20111027233157.18581.62295@gimli.local> In-Reply-To: <20111027233144.18581.30688@gimli.local> References: <20111027232818.18581.901@gimli.local> <20111027233144.18581.30688@gimli.local> Subject: [Patch, fortran] [32/66] inline sum and product: Update the scalarizer: clear specloop in gfc_trans_create_temp_arrays. Date: Thu, 27 Oct 2011 23:34: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/msg02544.txt.bz2 --===============9155523510653111715== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-length: 198 The code clearing specloop in gfc_conv_loop_setup would need some explanation. This patch moves it to gfc_trans_create_temp_array (where the reason for it are more clear) with a proper comment. OK? --===============9155523510653111715== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr43829-32.CL" Content-length: 179 2011-10-19 Mikael Morin * trans-array.c (gfc_conv_loop_setup, gfc_trans_create_temp_array): Move specloop arrays clearing from the former to the latter. --===============9155523510653111715== Content-Type: text/x-diff; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr43829-32.patch" Content-length: 1166 diff --git a/trans-array.c b/trans-array.c index 302f937..545f2fb 100644 --- a/trans-array.c +++ b/trans-array.c @@ -902,6 +902,11 @@ gfc_trans_create_temp_array (stmtblock_t * pre, stmtblock_t * post, pre); loop->from[n] = gfc_index_zero_node; + /* We have just changed the loop bounds, we must clear the + corresponding specloop, so that delta calculation is not skipped + later in set_delta. */ + loop->specloop[n] = NULL; + /* We are constructing the temporary's descriptor based on the loop dimensions. As the dimensions may be accessed in arbitrary order (think of transpose) the size taken from the n'th loop may not map @@ -4136,7 +4141,6 @@ gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where) { gfc_ss *tmp_ss; tree tmp; - int n; set_loop_bounds (loop); @@ -4172,9 +4176,6 @@ gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where) false, true, false, where); } - for (n = 0; n < loop->temp_dim; n++) - loop->specloop[loop->order[n]] = NULL; - /* For array parameters we don't have loop variables, so don't calculate the translations. */ if (loop->array_parameter) --===============9155523510653111715==--