From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84496 invoked by alias); 31 Jul 2017 02:25:07 -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 83766 invoked by uid 89); 31 Jul 2017 02:24:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=opportunity X-Spam-User: qpsmtpd, 2 recipients X-HELO: mtaout003-public.msg.strl.va.charter.net Received: from mtaout003-public.msg.strl.va.charter.net (HELO mtaout003-public.msg.strl.va.charter.net) (68.114.190.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 31 Jul 2017 02:24:21 +0000 Received: from impout003 ([68.114.189.18]) by mtaout003.msg.strl.va.charter.net (InterMail vM.9.00.023.01 201-2473-194) with ESMTP id <20170731022416.LLMS7355.mtaout003.msg.strl.va.charter.net@impout003>; Sun, 30 Jul 2017 21:24:16 -0500 Received: from quasar.localdomain ([96.41.215.23]) by impout003 with charter.net id rEQF1v0010Wrkg001EQFkQ; Sun, 30 Jul 2017 21:24:16 -0500 X-Authority-Analysis: v=2.2 cv=XZf59Mx5 c=1 sm=1 tr=0 a=salB9WdMPIDduBH7JsZfrA==:117 a=salB9WdMPIDduBH7JsZfrA==:17 a=IkcTkHD0fZMA:10 a=x7bEGLp0ZPQA:10 a=gt3gLmTGGQryUe9OkawA:9 a=QEXdDO2ut3YA:10 X-Auth-id: anZkZWxpc2xlQGNoYXJ0ZXIubmV0 Subject: Re: [ patch, libfortran] Fix PR 81581 To: Thomas Koenig , "fortran@gcc.gnu.org" , gcc-patches References: From: Jerry DeLisle Message-ID: Date: Mon, 31 Jul 2017 02:25:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00065.txt.bz2 On 07/30/2017 11:55 AM, Thomas Koenig wrote: > Hello world, > > the attached patch performs a runtime-check for the dim arguments > for transformational intrinsic functions. > > I debated with myself a bit if I should make this depend on > bounds checking, but I finally decided against it. The tests > performed are extemely cheap, the values are still in registers, > so any runtime overhead should be small. By contrast, loading > something from an external structure is probably more expensive > (but I didn't bother actually check). > > While visiting the code, I also took the opportunity to make > the rank and dim variables in the 'm' class of functions to index_type, > to make their use consistent. > > Regarding the test case names, I was unable to resist. > > Regression-tested. OK for trunk? > Looks OK, thanks, Jerry