From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99828 invoked by alias); 21 Nov 2015 10:41:55 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 99805 invoked by uid 89); 21 Nov 2015 10:41:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-ob0-f181.google.com Received: from mail-ob0-f181.google.com (HELO mail-ob0-f181.google.com) (209.85.214.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 21 Nov 2015 10:41:53 +0000 Received: by obbww6 with SMTP id ww6so105001782obb.0; Sat, 21 Nov 2015 02:41:51 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.182.81.5 with SMTP id v5mr12380904obx.78.1448102511202; Sat, 21 Nov 2015 02:41:51 -0800 (PST) Received: by 10.202.83.141 with HTTP; Sat, 21 Nov 2015 02:41:51 -0800 (PST) In-Reply-To: <20151120200947.GA61350@troutmask.apl.washington.edu> References: <20151120005836.GA53763@troutmask.apl.washington.edu> <20151120200947.GA61350@troutmask.apl.washington.edu> Date: Sat, 21 Nov 2015 10:41:00 -0000 Message-ID: Subject: Re: [PATCH] (Partial) Implementation of simplificaiton of CSHIFT From: Paul Richard Thomas To: Steve Kargl Cc: "fortran@gcc.gnu.org" , gcc-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00126.txt.bz2 Hi Steve, Just a couple of small typos: "Unexpected expr_type cause an ICE" ; causes? "! An array of derived types workd too." ; works? Apart from that it's OK for trunk. Thanks for the patch Cheers Paul On 20 November 2015 at 21:09, Steve Kargl wrote: > On Thu, Nov 19, 2015 at 04:58:36PM -0800, Steve Kargl wrote: >> >> 2015-11-19 Steven G. Kargl >> >> * intrinsic.h: Prototype for gfc_simplify_cshift >> * intrinsic.c (add_functions): Use gfc_simplify_cshift. >> * simplify.c (gfc_simplify_cshift): Implement simplification of CSHIFT. >> (gfc_simplify_spread): Remove a FIXME and add error condition. >> >> 2015-11-19 Steven G. Kargl >> >> * gfortran.dg/simplify_cshift_1.f90: New test. >> > > I've attached an updated patch. The changes consists of > 1) better/more comments > 2) re-organize code to reduce copying of the array. > 3) add optimization for a left/right shift that > returns the original array. > 4) Don't leak memory. > > -- > Steve -- Outside of a dog, a book is a man's best friend. Inside of a dog it's too dark to read. Groucho Marx