From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by sourceware.org (Postfix) with ESMTPS id 973033858025; Sat, 30 Sep 2023 13:16:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 973033858025 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1696079800; x=1696684600; i=vehre@gmx.de; bh=oRunH4ju6ZRBcSpwZjc5WHHJWKGipAcFHbfO2GJxpms=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=PBE5uWCLDcWyPoqAjSVtfPp05LjUyoJDUNI+J+HldDSt86j2eyt7TTyYyGKZVzuXf76r9BZnK4i imyv4Tgv/6xi73FkpYnrgseCpL+ty+DAeZMYrrN70V7kMTpXUEen0qCWR/3mCb1vv0RDeUE3FkLiT KZKpDJqPgyAdr09ARu0auBFG1ZAChK19M0QcXRcY3Yx68Kr/evO9SySgPk0uyut0sDkmxcp4LbY67 uJua4g2W2RQlQYSgW6/PJFvpPBECF0T9nnopDzCKfsmXo/Lp3q6wu2IgnUE7CwUB19DIJ2fTzbMQj 68IqVUwMaJYenoJOsQ4oAoNVpZUztNEIHSDw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from vepi2 ([79.194.173.146]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N4z6q-1rnVbv3SAW-010qNt; Sat, 30 Sep 2023 15:16:39 +0200 Date: Sat, 30 Sep 2023 15:16:38 +0200 From: Andre Vehreschild To: Andre Vehreschild via Fortran Cc: Paul Richard Thomas , GCC-Patches-ML , Katherine Rasmussen , Brad Richardson , seurer@gcc.gnu.org Subject: Re: [Fortran, Patch, Coarray, PR 37336] Fix crash in finalizer when derived type coarray is already freed. Message-ID: <20230930151638.52bedb9e@vepi2> In-Reply-To: <20230929151356.54e333ab@vepi2> References: <20230928144505.77e03a8e@vepi2> <20230929120118.078188ff@vepi2> <20230929151356.54e333ab@vepi2> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:oxQ6ElViStMLOVZUlSt6EPmE/8zr55VTzyDKe3QlzPNVhB6WEXi r3tzW8wSxY6RCiQQiTaPONVsSSwnZqiQgFC6k9Dn8xIa89RjMut5SMDuTBRLz1jT34apsnA pLRYm811KDOtIn07/vwWeEiQ94xdkEtdLGOKGj0kTQ30md5Ayijv2tP7CZ4s3E3KZWl0+qp UDN4BfTQGY6arYsoDbtrQ== UI-OutboundReport: notjunk:1;M01:P0:Xzv8GLTNrIU=;5XuczsjGFyHBFTBkTPhJj6A3KpC TaxdMI18m5MO2ArC7XpVPRWjrN1CRFBe0ZINjtK9sHnsadbf+1TTlF1jOrjxPaaOxMUEUvl3y iFM4Dw2mW73gTaFwzY6og0sejRKPIwjTIa+CCfK8gx7BHkrrMPR9kSGa5NRYOpmfB3sUu6n05 vCFbz/q56sujzoF+7y4vgJDnT8ET/WjnpCAF1FZAZhLZRY2xpjr3P3k3UndVlA11TQ+66YBbn Lk2e82+GBw/weRk1WxOU3SHtuxZ39SQ3Gu5/SoJGBo7JVZslV7cQuOX4DNN1tuNcukzDk5pCm kVMk8wWYlb5QiP1PIRxDIwqmZN5Rm8+R+zDTCeRKgJHu7BnakLHJDu7V4HN/QXlHyW6wLme4B Gn9NVXPB/GqjL+HpStZ6J3VS644wEGGd/X0XNcG/iCdaodC0lvT9+lJc0+vcdF+qAV0OQ+Hui gwf4KXb8npFm28OQf3Cg1u4RhyJhlTKJwlKMDUpay2pvRC+RTmmzwGS7Q50ToOvrmMIy35hOT yhe/48bcFf0adjbw00zf/4lnb8FEk9UjTcNEDt6UBDlGdktibzcdadNMrBzl6PtL5b0ILdsX+ 2ukzDrUtslgKPoye5S60IXUwfM+wu3XmJY+cMHJ3AYqSDjqdWNsknOqq0ND5lBw37ftf/YjXV tOZvxkukG+UuNlY41DSu5HGltVUYstd4+6UG8lUSjG9PBfgEvcRcYaTzTVFywqam1gKHsUx7h hmC82b/FSHwVm/grBNn8kRXQrVqKFBN8gKOV0s3LStvKTZnBSlH1wC+JLqeUpqGK2zoexvMLg Mdy5LeEmK7qq5Afb010LCGAfNMKeXtYHemwO91IvlTjHCN3hsBXNsDg9NzqxFLm8mmowy+E0S fqfKbqCgztRfY6cFQjqlslxIM4547vTCRVPyi7/c+WfCAoqYOpVW9ZlAY9Kvy+FNEI/2Fjdpw qwbahXlmhiIXyGTDo/t+rnF+Nb0= X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi all, back porting to gcc-13 unfortunately caused a regression due to gfc_deallocate_with_status() having a different parameter count. This is f= ixed as obvious by 874b895fffd921659b37dc05bc94eea48e9a0157. Sorry for breaking gfortran-13. I still don't know why it checkout fine on= my system in the beginning. I must have done something wrong. Please accept my apologies and regards, Andre On Fri, 29 Sep 2023 15:13:56 +0200 Andre Vehreschild via Fortran wrote: > Hi Paul, > > thanks. Commit to trunk as a680274616ec6b26ccfdcee400ed7f54e341d40c > and backported to gcc-13 as d9b3269bdccac2db9200303494c4e82f2aeb7bbc > > Thanks for the fast review. > > Regards, > Andre > > On Fri, 29 Sep 2023 13:38:57 +0100 > Paul Richard Thomas wrote: > > > Hi Andre, > > > > Yes indeed - it's fine for trunk and, I would suggest, 13-branch. > > > > Cheers > > > > Paul > > > > On Fri, 29 Sept 2023 at 11:01, Andre Vehreschild wrote: > > > > > > Hi Paul, > > > > > > thanks for the quick review. I've added a testcase with a module and= a > > > finalizer in the derived type. This also is no problem. > > > > > > Regtests ok on x86_64_linux_gnu/f37. Ok for trunk? > > > > > > Regards, > > > Andre > > > > > > On Thu, 28 Sep 2023 19:21:12 +0100 > > > Paul Richard Thomas wrote: > > > > > > > Hi Andre, > > > > > > > > The patch looks fine to me. Since you mention it in the comment, i= s it > > > > worth declaring the derived type 'foo' in a module and giving it a > > > > final routine? > > > > > > > > Thanks for the patch. > > > > > > > > Paul > > > > > > > > On Thu, 28 Sept 2023 at 13:45, Andre Vehreschild via Fortran > > > > wrote: > > > > > > > > > > Hi all, > > > > > > > > > > attached patch fixes a crash in coarray programs when an allocat= able > > > > > derived typed coarray was freed explicitly. The generated cleanu= p code > > > > > did not take into account, that the coarray may have been deallo= cated > > > > > already. The patch fixes this by moving the statements accessing > > > > > components inside the derived type into the block guard by its > > > > > allocated check. > > > > > > > > > > Regtested ok on f37/x86_64. Ok for master? > > > > > > > > > > Regards, > > > > > Andre > > > > > -- > > > > > Andre Vehreschild * Email: vehre ad gmx dot de > > > > > > > > > -- > > > Andre Vehreschild * Email: vehre ad gmx dot de > > > -- > Andre Vehreschild * Email: vehre ad gmx dot de =2D- Andre Vehreschild * Email: vehre ad gmx dot de