From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19656 invoked by alias); 15 Jan 2019 22:11:39 -0000 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 Received: (qmail 19534 invoked by uid 89); 15 Jan 2019 22:11:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT autolearn=no version=3.3.2 spammy=HTo:U*tkoenig, H*f:sk:119d761, H*i:sk:119d761 X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 Jan 2019 22:11:37 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id x0FMBZ2q004936 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 15 Jan 2019 14:11:35 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id x0FMBZmP004935; Tue, 15 Jan 2019 14:11:35 -0800 (PST) (envelope-from sgk) Date: Tue, 15 Jan 2019 22:11:00 -0000 From: Steve Kargl To: Thomas Koenig Cc: "fortran@gcc.gnu.org" , gcc-patches Subject: Re: [patch, fortran] Fix PR 43072 Message-ID: <20190115221135.GA4744@troutmask.apl.washington.edu> Reply-To: sgk@troutmask.apl.washington.edu References: <119d7610-8bca-30e2-fcb0-86ed2e9eeb09@netcologne.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <119d7610-8bca-30e2-fcb0-86ed2e9eeb09@netcologne.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-01/txt/msg00873.txt.bz2 On Tue, Jan 15, 2019 at 10:58:33PM +0100, Thomas Koenig wrote: > > the attached patch fixes a missed optimization where a substring equal > in length to the original variable currently leads to an unneeded > temporary. > > Regression-tested. OK for trunk? Yes. See below. > > 2019-01-15 Thomas Koenig > > PR fortran/43072 > * resolve.c (resolve_array_ref): Add equal_length argument; set it > if the length of the substring equals that of the orignal > variable. > (resolve_ref): Remove the substring if it is equal in length > length to the original variable, unless it is an EXPR_SUBSTRING). in length length? -- Steve