From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66343 invoked by alias); 22 Sep 2018 17:58: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 66323 invoked by uid 89); 22 Sep 2018 17:58:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*i:sk:ad078ac, H*f:sk:ad078ac X-HELO: mtaout005-public.msg.strl.va.charter.net Received: from mtaout005-public.msg.strl.va.charter.net (HELO mtaout005-public.msg.strl.va.charter.net) (68.114.190.30) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 22 Sep 2018 17:58:37 +0000 Received: from impout001 ([68.114.189.16]) by mtaout005.msg.strl.va.charter.net (InterMail vM.9.00.023.01 201-2473-194) with ESMTP id <20180922175835.FAYY7356.mtaout005.msg.strl.va.charter.net@impout001>; Sat, 22 Sep 2018 12:58:35 -0500 Received: from [192.168.1.6] ([96.41.213.35]) by impout001 with charter.net id ehya1y00H0mPCJg01hybeY; Sat, 22 Sep 2018 12:58:35 -0500 X-Auth-id: anZkZWxpc2xlQGNoYXJ0ZXIubmV0 Subject: Re: [patch, fortran] Clobber some intent(out) variables on call To: Thomas Koenig , "fortran@gcc.gnu.org" , gcc-patches References: From: Jerry DeLisle Message-ID: <5d69bde1-5fc9-7eeb-9c8c-f5460d043c2a@charter.net> Date: Sat, 22 Sep 2018 18:32:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2018-09/txt/msg01288.txt.bz2 Minor typo, see below. On 9/22/18 10:23 AM, Thomas Koenig wrote: > Hello world, > > the attached patch lets the middle-end know that variables > associated with intent(out) arguments become undefined, by > issuing an assignment to a special value (a "clobber") > before entering the procedure. > > Originally, I had also planned to do so on entry to the > procedure, see https://gcc.gnu.org/ml/fortran/2018-09/msg00148.html . > This turned out to cause regressions; some details are outlined > in the PR. > > Regression-tested. OK for trunk? > ! { dg-do compile } ! { dg-options "-O -fno-inline -fdump-tree-optimized -fdump-tree-original" } ! PR fortran/41453 ! Check that there is one clobber in the *.original tree, plus that ! the constant 123456789 has been removed tue to the INTENT(OUT). s/tue/due/ and program main use x implicit none integer :: a a = 12345689 <---- missing 7 digit? call foo(a) print *,a end program main Otherwise OK. Jerry