From patchwork Tue Oct 5 10:11:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Morin X-Patchwork-Id: 66800 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 DBB38B70CC for ; Tue, 5 Oct 2010 21:15:22 +1100 (EST) Received: (qmail 29608 invoked by alias); 5 Oct 2010 10:13:27 -0000 Received: (qmail 29526 invoked by uid 22791); 5 Oct 2010 10:13:25 -0000 X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_NEUTRAL, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp22.services.sfr.fr (HELO smtp22.services.sfr.fr) (93.17.128.11) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Oct 2010 10:12:52 +0000 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2208.sfr.fr (SMTP Server) with ESMTP id 958B370000BD; Tue, 5 Oct 2010 12:11:14 +0200 (CEST) Received: from gimli.local (99.123.193-77.rev.gaoland.net [77.193.123.99]) by msfrf2208.sfr.fr (SMTP Server) with ESMTP id 5F98F7000331; Tue, 5 Oct 2010 12:11:14 +0200 (CEST) X-SFR-UUID: 20101005101114397.5F98F7000331@msfrf2208.sfr.fr MIME-Version: 1.0 From: Mikael Morin To: gfortran , patches Message-ID: <20101005100948.1836.9982@gimli.local> In-Reply-To: <20101005100947.1836.44153@gimli.local> References: <20101005100947.1836.44153@gimli.local> Subject: [Patch, fortran] [21/22] Various minor fixups Date: Tue, 5 Oct 2010 12:11:14 +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 2010-10-04 Mikael Morin * trans-array.c (gfc_free_ss_chain): Made non-static. * trans-array.h (gfc_free_ss_chain): New prototype. * trans-stmt.c (gfc_trans_where_2): Free ss chains. diff --git a/trans-array.c b/trans-array.c index b32c3ec..e17a580 100644 --- a/trans-array.c +++ b/trans-array.c @@ -448,7 +448,7 @@ static void gfc_free_ss (gfc_ss *); /* Free a gfc_ss chain. */ -static void +void gfc_free_ss_chain (gfc_ss * ss) { gfc_ss *next; diff --git a/trans-array.h b/trans-array.h index f363716..4b0da3e 100644 --- a/trans-array.h +++ b/trans-array.h @@ -81,6 +81,8 @@ void gfc_cleanup_loop (gfc_loopinfo *); void gfc_add_ss_to_loop (gfc_loopinfo *, gfc_ss *); /* Mark a SS chain as used in this loop. */ void gfc_mark_ss_chain_used (gfc_ss *, unsigned); +/* Free a gfc_ss chain. */ +void gfc_free_ss_chain (gfc_ss *); /* Calculates the lower bound and stride of array sections. */ void gfc_conv_ss_startstride (gfc_loopinfo *); diff --git a/trans-stmt.c b/trans-stmt.c index 82cddd7..01dcc56 100644 --- a/trans-stmt.c +++ b/trans-stmt.c @@ -3924,6 +3924,9 @@ gfc_trans_where_2 (gfc_code * code, tree mask, bool invert, inner_size = compute_inner_temp_size (cblock->expr1, cblock->expr1, &inner_size_body, &lss, &rss); + gfc_free_ss_chain (lss); + gfc_free_ss_chain (rss); + /* Calculate the total size of temporary needed. */ size = compute_overall_iter_number (nested_forall_info, inner_size, &inner_size_body, block);