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