From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19923 invoked by alias); 27 May 2015 16:24:48 -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 19903 invoked by uid 89); 27 May 2015 16:24:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: smtp21.services.sfr.fr Received: from smtp21.services.sfr.fr (HELO smtp21.services.sfr.fr) (93.17.128.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 27 May 2015 16:24:45 +0000 Received: from filter.sfr.fr (localhost [86.72.15.79]) by msfrf2102.sfr.fr (SMTP Server) with ESMTP id ED7AC7000289; Wed, 27 May 2015 18:24:41 +0200 (CEST) Authentication-Results: sfrmc.priv.atos.fr; dkim=none (no signature); dkim-adsp=none (no policy) header.from=mikael.morin@sfr.fr Received: from tolstoi.localhost (79.15.72.86.rev.sfr.net [86.72.15.79]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by msfrf2102.sfr.fr (SMTP Server) with ESMTP id 04A107000277; Wed, 27 May 2015 18:24:40 +0200 (CEST) X-SFR-UUID: 20150527162441190.04A107000277@msfrf2102.sfr.fr Message-ID: <5565EFB9.8060901@sfr.fr> Date: Wed, 27 May 2015 16:42:00 -0000 From: Mikael Morin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Andre Vehreschild , Paul Richard Thomas CC: "fortran@gcc.gnu.org" , gcc-patches Subject: Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram References: <20150523195252.22647b46@vepi2> <20150525122447.5aafa2da@vepi2> <20150527160733.0880b1d2@vepi2> In-Reply-To: <20150527160733.0880b1d2@vepi2> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg02494.txt.bz2 Le 27/05/2015 16:07, Andre Vehreschild a écrit : > Hi Paul, hi Mikael, > > about renaming the identifier emitted: I would like to keep it short. Remember, > there is always a number attached to it, which makes it unique. Furthermore > does "alloc_source_tmp" sound unnecessarily long to me. It tastes like we do > not trust the unique identifier mechanism established in gfortran. But that is > just my personal taste. > Then let's go with "source", which seems to get the majority of the votes. It remains an improvement over "expr3" and "atmp". > about missing expr->rank == 0) in the extended patch: I just wanted to present > an idea here. The patch was not meant to be commited yet. I think it > furthermore is just half of the rent (like we say in Germany). I think we can > do better, when we also think about the preceeding two if-blocks (the ones > taking care about derived and class types). It should be possible to do > something similar there. Furthermore could one think about moving e3rhs for > array valued objects, too. But then we should not move to the last element, but > instead to the first element. Nevertheless in the array valued case one might > end up still having to deallocate the components or e3rhs, when the object > allocated is zero sized. I wonder whether the bother really pays. > > What do you think about it? > I don't want to review monster patches. ;-) More seriously, I think there are more important things than this, but the patch was there and seemed reasonable. One can add support for the other if-blocks. About the rest, I'm not sure I understand. Or rather, I'm sure I don't. Does it make a difference first or last element? What is so specific about "array valued case"? We can try to add support for this in more and more cases, but please let's not make the code impossible to understand. > Paul: I would recommend you commit with symbol rename, but without the move > optimization. We can do that later. > Agreed. Mikael