From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by sourceware.org (Postfix) with ESMTPS id B43973858402; Mon, 7 Feb 2022 21:09:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B43973858402 X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.29] ([79.251.6.102]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MhD2O-1nvCmI3vRy-00eLrt; Mon, 07 Feb 2022 22:09:45 +0100 Message-ID: Date: Mon, 7 Feb 2022 22:09:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [Patch, fortran] PR37336 (Finalization) - [F03] Finish derived-type finalization Content-Language: en-US To: Paul Richard Thomas , "fortran@gcc.gnu.org" , gcc-patches Cc: Alessandro Fanfarillo , Andrew Benson Newsgroups: gmane.comp.gcc.fortran,gmane.comp.gcc.patches References: From: Harald Anlauf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:nBRFwVqbLHaSyZ+sYZGXb8HCbeWgd18l/LmuvbyusCrq542nuxU 2nOGJ+XShtlbi0szYoVorsABgte90Y7GhxrETXZuZ1C0HTQ82PlGsc3bNRm8yGPk0Z2hMK0 TO5W/NCPY0XSa6UuBfc0+zN2bAKfPmbTecc6RD6dJfPusuR2nGewp4q8xnVraYGGwsaFS+P 2ZLvrTTOvKvpp3jkqGyHg== X-UI-Out-Filterresults: notjunk:1;V03:K0:JhN4twN4J2Y=:ze8jV818HDHuMu4fWv3hlT s9xjDTXKbJni7t2a6MF3e5UingkVYoML/Es12GC1p2B2BphJf7pW89YI5AVTGs/soRnRSIOmW yN/FwCqrg89b9iAUih2/IavSR4bbP6thjMdpFYk6l2lNZcAly4jVYiiRA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WL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2022 21:09:49 -0000 Hi Paul, thanks for attacking this. I haven't looked at the actual patch, only tried to check the new testcases with other compilers. Am 03.02.22 um 18:14 schrieb Paul Richard Thomas via Fortran: > I have tried to interpret F2018 7.5.6.2 and 7.5.6.3 as well as possible. > This is not always straightforward and has involved a lot of head > scratching! I have used the Intel compiler as a litmus test for the > outcomes. This was largely motivated by the observation that, in the user > survey conducted by Steve Lionel, gfortran and ifort are often used > together . Therefore, quite aside from wishing to comply with the standard > as far as possible, it is more than reasonable that the two compilers > comply. On application of this patch, only exception to this is the > treatment of finalization of arrays of extended types, where the Intel > takes "If the entity is of extended type and the parent type is > finalizable, the parent component is finalized" such that the parent > component is finalized one element at a time, whereas gfortran finalises > the parent components as an array. I strongly suspect that, from reading > 7.5.6.2 paragraphs 2 and 3 closely, that ifort has it right. However, this > is another issue to come back to in the future. Could you specify which version of Intel you tried? Testcase finalize_38.f90 fails for me with ifort 2021.5.0 with: 131 This test also fails with crayftn 11 & 12 and nagfor 7.0, but in a different place. (Also finalize_45.f90 fails with that version with something that looks like memory corruption, but that might be just a compiler bug.) Thanks, Harald 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 A9F553858C83 for ; Mon, 7 Feb 2022 21:09:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A9F553858C83 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nHBGe-0003pG-7P for fortran@gcc.gnu.org; Mon, 07 Feb 2022 22:09:48 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: fortran@gcc.gnu.org From: Harald Anlauf Subject: Re: [Patch, fortran] PR37336 (Finalization) - [F03] Finish derived-type finalization Date: Mon, 7 Feb 2022 22:09:41 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US In-Reply-To: Cc: gcc-patches@gcc.gnu.org X-Spam-Status: No, score=-2.9 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, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Feb 2022 21:09:51 -0000 Message-ID: <20220207210941.SUXGmmwR-ppBbfo1sDtUxlIeJKD55X1KKQtT8fGh2ag@z> Hi Paul, thanks for attacking this. I haven't looked at the actual patch, only tried to check the new testcases with other compilers. Am 03.02.22 um 18:14 schrieb Paul Richard Thomas via Fortran: > I have tried to interpret F2018 7.5.6.2 and 7.5.6.3 as well as possible. > This is not always straightforward and has involved a lot of head > scratching! I have used the Intel compiler as a litmus test for the > outcomes. This was largely motivated by the observation that, in the user > survey conducted by Steve Lionel, gfortran and ifort are often used > together . Therefore, quite aside from wishing to comply with the standard > as far as possible, it is more than reasonable that the two compilers > comply. On application of this patch, only exception to this is the > treatment of finalization of arrays of extended types, where the Intel > takes "If the entity is of extended type and the parent type is > finalizable, the parent component is finalized" such that the parent > component is finalized one element at a time, whereas gfortran finalises > the parent components as an array. I strongly suspect that, from reading > 7.5.6.2 paragraphs 2 and 3 closely, that ifort has it right. However, this > is another issue to come back to in the future. Could you specify which version of Intel you tried? Testcase finalize_38.f90 fails for me with ifort 2021.5.0 with: 131 This test also fails with crayftn 11 & 12 and nagfor 7.0, but in a different place. (Also finalize_45.f90 fails with that version with something that looks like memory corruption, but that might be just a compiler bug.) Thanks, Harald