From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp06.smtpout.orange.fr [80.12.242.128]) by sourceware.org (Postfix) with ESMTPS id 5F9CA385840A for ; Fri, 5 Nov 2021 19:53:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5F9CA385840A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=none smtp.mailfrom=orange.fr Received: from [192.168.1.17] ([92.167.144.168]) by smtp.orange.fr with ESMTPA id j5HZmBCYRz7UPj5HZmKQOP; Fri, 05 Nov 2021 20:53:50 +0100 X-ME-Helo: [192.168.1.17] X-ME-Auth: MDU4MTIxYWM4YWI0ZGE4ZTUwZWZmNTExZmI2ZWZlMThkM2ZhYiE5OWRkOGM= X-ME-Date: Fri, 05 Nov 2021 20:53:50 +0100 X-ME-IP: 92.167.144.168 Subject: Re: [PATCH,Fortran 1/1] Tweak locations around CAF simplify To: Bernhard Reutner-Fischer , gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Cc: Bernhard Reutner-Fischer References: <20211027212941.309870-1-rep.dot.nop@gmail.com> <20211027212941.309870-2-rep.dot.nop@gmail.com> From: Mikael Morin Message-ID: <5882a7ef-5c6f-5e60-d5e7-7150da1db80e@orange.fr> Date: Fri, 5 Nov 2021 20:53:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211027212941.309870-2-rep.dot.nop@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, FREEMAIL_FROM, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2021 19:53:52 -0000 Le 27/10/2021 à 23:29, Bernhard Reutner-Fischer via Fortran a écrit : > From: Bernhard Reutner-Fischer > > addresses: FIXME: gfc_current_locus is wrong > by using the locus of the current intrinsic. > Regtests clean, ok for trunk? > Hello, I’m not convinced that replacing a global variable by an other really fixes things. gfc_current_intrinsic_where is only valid if the simplification functions are called from gfc_intrinsic_func_interface. The fatal errors hardly need a location anyway; as for the rest, well... A proper fix would add a location argument to gfc_simplify_f’s union fields (and maybe gfc_check_f’s as well), and the associated simplification functions. As the impact would be somewhat massive, maybe add new distinct union fields with location arguments and a procedure (a switch on the intrinsic id basically) to decide which field to use. Does it sound good to you? Mikael