From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13038 invoked by alias); 27 Oct 2011 23:30:11 -0000 Received: (qmail 12750 invoked by uid 22791); 27 Oct 2011 23:30:07 -0000 X-SWARE-Spam-Status: No, hits=-1.5 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:54 +0000 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2512.sfr.fr (SMTP Server) with ESMTP id ED34C7000089; Fri, 28 Oct 2011 01:29:52 +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 AEAE37000040; Fri, 28 Oct 2011 01:29:52 +0200 (CEST) X-SFR-UUID: 20111027232952715.AEAE37000040@msfrf2512.sfr.fr Content-Type: multipart/mixed; boundary="===============1639000500060920476==" MIME-Version: 1.0 From: Mikael Morin To: gfortran , GCC patches Message-ID: <20111027232952.18581.91575@gimli.local> In-Reply-To: <20111027232947.18581.48982@gimli.local> References: <20111027232818.18581.901@gimli.local> <20111027232947.18581.48982@gimli.local> Subject: [Patch, fortran] [13/66] inline sum and product: Interfaces changes: gfc_trans_array_constructor Date: Thu, 27 Oct 2011 23:36: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/msg02570.txt.bz2 --===============1639000500060920476== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-length: 357 loop.temp_dim is set by gfc_trans_create_temp_array; there should be no reason why that value wouldn't suit gfc_trans_constant_array_constructor, which has then no reason to set the value directly. This patch remove that code. Then, the loop argument is useless and can be removed too. The function is static, so it loses its gfc_ prefix along the way. OK? --===============1639000500060920476== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr43829-13.CL" Content-length: 305 2011-10-19 Mikael Morin * trans-array.c (gfc_trans_constant_array_constructor, trans_constant_array_constructor): Rename the former to the latter. Don't set the rank of the temporary for the loop. Remove then unused loop argument. (gfc_trans_array_constructor): Update call. --===============1639000500060920476== Content-Type: text/x-diff; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr43829-13.patch" Content-length: 1443 diff --git a/trans-array.c b/trans-array.c index f611302..c39fc9e 100644 --- a/trans-array.c +++ b/trans-array.c @@ -1849,8 +1849,7 @@ gfc_build_constant_array_constructor (gfc_expr * expr, tree type) gfc_build_constant_array_constructor. */ static void -gfc_trans_constant_array_constructor (gfc_loopinfo * loop, - gfc_ss * ss, tree type) +trans_constant_array_constructor (gfc_ss * ss, tree type) { gfc_ss_info *info; tree tmp; @@ -1871,14 +1870,11 @@ gfc_trans_constant_array_constructor (gfc_loopinfo * loop, info->end[i] = gfc_index_zero_node; info->stride[i] = gfc_index_one_node; } - - if (info->dimen > loop->temp_dim) - loop->temp_dim = info->dimen; } /* Helper routine of gfc_trans_array_constructor to determine if the bounds of the loop specified by LOOP are constant and simple enough - to use with gfc_trans_constant_array_constructor. Returns the + to use with trans_constant_array_constructor. Returns the iteration count of the loop if suitable, and NULL_TREE otherwise. */ static tree @@ -2033,7 +2029,7 @@ gfc_trans_array_constructor (gfc_loopinfo * loop, gfc_ss * ss, locus * where) tree size = constant_array_constructor_loop_size (loop); if (size && compare_tree_int (size, nelem) == 0) { - gfc_trans_constant_array_constructor (loop, ss, type); + trans_constant_array_constructor (ss, type); goto finish; } } --===============1639000500060920476==--