From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 188B43858D20 for ; Wed, 5 Apr 2023 19:00:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 188B43858D20 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pk8MT-0005U0-Or for fortran@gcc.gnu.org; Wed, 05 Apr 2023 21:00:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: fortran@gcc.gnu.org From: Harald Anlauf Subject: Re: [Patch, fortran] PR104272 - finalizer gets called during allocate Date: Wed, 5 Apr 2023 20:53:48 +0200 Message-ID: <2f926853-bf23-cdc3-6bf5-b75b7f7e872e@gmx.de> References: <072f908e-ab68-1087-7e86-f7a494d8f35b@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Content-Language: en-US In-Reply-To: <072f908e-ab68-1087-7e86-f7a494d8f35b@gmx.de> Cc: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Message-ID: <20230405185348.zxQU_T4aWCQ7xOw0UnvM1KyCH20SrqAxM7-fjb2Z8l8@z> On 4/5/23 20:50, Harald Anlauf via Gcc-patches wrote: > can you have a look again at the logic in the hunk touching > trans-stmt.cc (gfc_trans_allocate)?  I haven't checked in detail, > but it seems possible that you get a stale tmp in the > gfc_prepend_expr_to_block if (code->ext.alloc.expr3_not_explicit == 0). Oops, I meant if (code->ext.alloc.expr3_not_explicit != 0) > Wouldn't it make more sense to move this condition before the braces > as part of the overall condition? > >> OK for mainline? > > Otherwise this LGTM. > > Thanks for the patch! > > Harald