From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122279 invoked by alias); 15 Nov 2019 07:30:15 -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 122231 invoked by uid 89); 15 Nov 2019 07:30:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=studied, H*f:sk:4828691, attrvalue, UD:attr.value X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Nov 2019 07:30:13 +0000 IronPort-SDR: IrHEkSNo78QtflenEP+Na45JOw/VbKmtLwNVuHfpJCkWZEzV0X0IUpB+C0ej3M2bB9OQJyN6Jf k3LTa7iMfSy0lBG5zzSuvtgqTn8edtXkY2/KDbuNpj27zkPuNmFDogH6Wqch/n9ePONy28R8jn l52pb5eeICYgAKDtpU7+kLMC+rVa6e5iVvomhx8oE0Cyo6QxmlHWGG4f/NEYV9g47hyQJevCPf KzcK/Xe9vdMS92mf20RXN6Fyf0pZra/q2CoPxPKkjfAe4p9UuzreFsslfCLVVppmP/SVDpUKR/ qL0= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 14 Nov 2019 23:30:06 -0800 IronPort-SDR: VqxDIU0V+NE7uDl2vamykcOYy7ftoUqo2vP+iR4lJnDaer2OTpDLk8ltMROFCkT2kYlwmLmcc2 AjYENyxPWuVfpLfwcbQ2pstikarA30DL1XxenK6U3db7EjEwt8S70Hndysc+KGWQuWfxaKNk0A 3//TrwecepxmI2ebbKeUYFevR80Z1XFH4QxPOOe5O34J5JaoZwheiTJB3q37kQHtZOwtJ1MRao S6i21SRbq4p+jYEbPfCJkeHQDkyxUEuIrihAiATw6MxaFaQw2gO7uW7aCKWly3piBPuqbkunTK EbI= Subject: Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures To: =?UTF-8?Q?Thomas_K=c3=b6nig?= , "fortran@gcc.gnu.org" , gcc-patches References: <48286910-ebbb-10e4-488b-8c96e505375c@tkoenig.net> From: Tobias Burnus Message-ID: Date: Fri, 15 Nov 2019 07:41:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <48286910-ebbb-10e4-488b-8c96e505375c@tkoenig.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Return-Path: tobias@codesourcery.com X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg01326.txt.bz2 Hi Thomas, On 11/11/19 10:55 PM, Thomas König wrote: > the attached patch loads scalar INTENT(IN) variables to a local > variable at the start of a procedure, as suggested in PR 67202, in > order to aid optimization.  This is controlled by front-end > optimization so it is easier to catch if any bugs should turn up :-) > + if (f->sym == NULL || f->sym->attr.dimension || f->sym->attr.allocatable > + || f->sym->attr.optional || f->sym->attr.pointer > + || f->sym->attr.codimension || f->sym->attr.value > + || f->sym->attr.proc_pointer || f->sym->attr.target > + || f->sym->attr.asynchronous > + || f->sym->ts.type == BT_CHARACTER || f->sym->ts.type == BT_DERIVED > + || f->sym->ts.type == BT_CLASS) > + continue; I think you need to add at least VOLATILE to this list – otherwise, I have not thought much about corner cases nor have studied the patch, sorry. Cheers, Tobias