From patchwork Thu Oct 27 23:31:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Morin X-Patchwork-Id: 122291 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id DEAD2B6F95 for ; Fri, 28 Oct 2011 10:33:34 +1100 (EST) Received: (qmail 24460 invoked by alias); 27 Oct 2011 23:32:16 -0000 Received: (qmail 22049 invoked by uid 22791); 27 Oct 2011 23:31:38 -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:31:22 +0000 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2512.sfr.fr (SMTP Server) with ESMTP id C1F187000040; Fri, 28 Oct 2011 01:31:21 +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 842AA700008E; Fri, 28 Oct 2011 01:31:21 +0200 (CEST) X-SFR-UUID: 20111027233121541.842AA700008E@msfrf2512.sfr.fr MIME-Version: 1.0 From: Mikael Morin To: gfortran , GCC patches Message-ID: <20111027233121.18581.75361@gimli.local> In-Reply-To: <20111027233031.18581.58613@gimli.local> References: <20111027232818.18581.901@gimli.local> <20111027233031.18581.58613@gimli.local> Subject: [Patch, fortran] [27/66] inline sum and product: Update core structs: Move temp struct. Date: Fri, 28 Oct 2011 01:31:21 +0200 (CEST) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This moves data::temp field from gfc_ss to gfc_ss_info. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct gfc_ss::data::temp into gfc_ss_info::data. * trans-array.c (gfc_get_temp_ss, gfc_conv_loop_setup): Update reference chains. diff --git a/trans-array.c b/trans-array.c index eef0f09..173e52b 100644 --- a/trans-array.c +++ b/trans-array.c @@ -558,11 +558,11 @@ gfc_get_temp_ss (tree type, tree string_length, int dimen) ss_info = gfc_get_ss_info (); ss_info->type = GFC_SS_TEMP; ss_info->string_length = string_length; + ss_info->data.temp.type = type; ss = gfc_get_ss (); ss->info = ss_info; ss->next = gfc_ss_terminator; - ss->data.temp.type = type; ss->dimen = dimen; for (i = 0; i < ss->dimen; i++) ss->dim[i] = i; @@ -4127,12 +4127,12 @@ gfc_conv_loop_setup (gfc_loopinfo * loop, locus * where) /* Make absolutely sure that this is a complete type. */ if (tmp_ss_info->string_length) - loop->temp_ss->data.temp.type + tmp_ss_info->data.temp.type = gfc_get_character_type_len_for_eltype - (TREE_TYPE (loop->temp_ss->data.temp.type), + (TREE_TYPE (tmp_ss_info->data.temp.type), tmp_ss_info->string_length); - tmp = loop->temp_ss->data.temp.type; + tmp = tmp_ss_info->data.temp.type; memset (&loop->temp_ss->data.info, 0, sizeof (gfc_array_info)); tmp_ss_info->type = GFC_SS_SECTION; diff --git a/trans.h b/trans.h index 567e5a3..60708e9 100644 --- a/trans.h +++ b/trans.h @@ -197,6 +197,13 @@ typedef struct gfc_ss_info tree value; } scalar; + + /* GFC_SS_TEMP. */ + struct + { + tree type; + } + temp; } data; } @@ -219,12 +226,6 @@ typedef struct gfc_ss union { - /* GFC_SS_TEMP. */ - struct - { - tree type; - } - temp; /* All other types. */ gfc_array_info info; }