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 9F5813858CDA for ; Mon, 9 Jan 2023 20:42:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F5813858CDA 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=1673296974; bh=4ukdvmAOoeA21jOzwaXJ4sDCaV9QTp47KzQEqcNxtKA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=ozfxn+rC11RxJTqr0xvm7SkcToLig+kbT7N/Eid4D+HJ0DqoqLJjQcMAmd7sHXYH6 mzkBKUoIFzPz04zZNmWeHg1trXq5tkWczxh0vwYwf2/EpMslB5QP+f5gxbGgy+EdUV dtV94M7nGhDIaLddeQXL+wNVARD2mxLRKJLRuhmGJSitmld3I9DNW1AVtChLu8yHYS nckiTa9PtVTcZ3ulCRMvh9gCOzsx3XGzzTg5IFUObNhEj6jMv8aLW1Q4FCqEZ9gikP GoVJnC50LHRB1W6ag6MM2pcDt89AtFxGnpA6/JZXXwOaY75B7XUMwu9+UFo7TIDach U56Bc1GUR4GDg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [93.207.86.25] ([93.207.86.25]) by web-mail.gmx.net (3c-app-gmx-bap17.server.lan [172.19.172.87]) (via HTTP); Mon, 9 Jan 2023 21:42:54 +0100 MIME-Version: 1.0 Message-ID: From: Harald Anlauf To: Paul Richard Thomas Cc: Jerry D , fortran Subject: Aw: Re: Fw: Re: [Patch, fortran] PR37336 (Finalization) - [F03] Finish derived-type finalization Content-Type: text/plain; charset=UTF-8 Date: Mon, 9 Jan 2023 21:42:54 +0100 Importance: normal Sensitivity: Normal In-Reply-To: References: <3cbaf568-84ac-8498-558f-9560fe395d66@gmx.de> <7ab973cd-f62e-28be-36e8-4e44252a4a38@gmx.de> <061aee5b-c27c-3a9f-419d-9893c2d744c4@netcologne.de> <78aafe8c-dcf9-55e6-50ce-c6289ea1f3fe@gmail.com> Content-Transfer-Encoding: quoted-printable X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:ZtYDt9oQ/GXRz+Xfr/9tA5DL10IN+XxkvNaNaoU/t+bpC3BmrwWbEPjBV1Tqpp+SwD0lt gp54M25ccBvKg7WVM+SSCjbJaX69nB5T2lgbiT+Ev5KthDJ5LYfMvv5Wc4GFpRmdOimwm2yp+0Px tP3P639G5aeucn7V/tqtfrc8jD5qLqy7T1FQlolVznrB7bQEWvsDr3v7nx7OkGERnVUStMEVihRk Qtv0oba9g8AI5OBBmwf/zVU5FB+HkEZA8oV6sLs9sDM+MjdugciEz7rsAi1JQlVu9ZIqhBbs3INi MA= UI-OutboundReport: notjunk:1;M01:P0:7HOzAbV++3I=;8jUkp4QQibHiLwXNbLWdlORh528 p0V/2LEg9YqtfFvbr7WTllTKYwLyZvrTDwhVQnFHscjKXgETDl6FSe0RZ0O8J7maMf+SsAqDJ O+u67LS6Ek8mTNMZvjYdadNBWG0GzC3a6fsXQTbsxGINepyrpmVIeClkO+6tZze9pXG8LleAf Tf5dyF4eWPB2pdlyhNERC/b4ryoMpVcp7jUZA5B7Dnm0MSsp9pTdKw/gUh5Iz0XX5+HFGrQdW u+x600TCzE//sslVmUyO8Wpnx2pG+Rs5Q9rL6Xc1CU1m0qhQmx5ZsTPcOOOtIa/OE35YmP/4/ mwY2CE/CXL+UzYNYI+ZMhUEBmf4248ce4r1Hg6Ja+xNMsNUjUYWh7wGDrs+crjxb0BexZC6ht Z2F7ZE14gX3KNjgQKiuqIxLDbKPsn4/POxdBa0TWryLopuBybn6M//sXxxyPPDgSMHY8hg2Hk nvv3fcVK9NO7eODpiTqVD00ex7HzTfzeDvus7jKvF66Lo9e8bTSQeDoW5t9ixzPIs+uiSRgNK wyUJDY39OE5biF/oLrbJ4hwcVmU2Sl4b2wZriDN1brVXU291x8gjRE8T5myD+9D+lH5ugBCxk r4LGc28Kctmw1zm2UA0Wuugnyjj4mLQGSQ9ngXp8owC5lduTMBZJ2IuI3gvgARH/1YwLOJcvc gxckg0Hx84dbePsnJ5xU3LF8FRfW7RIRFiaAXOOP6dWYGYhAXgi7NxPTC523UhfxGvcnLgY8u BgYHGCwgw2Ossd2tezM1fDhH4xtKuR9vZ9jzVzjU6JMmqlTRriF1XimEkH8QL3BOrzoBrid7N C1Jn0fnFaPYDkVySH5i6tELw== X-Spam-Status: No, score=-5.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_H2,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 Paul, all, =C2=A0 this is certainly better, and I am close to saying "go ahead", and "let's fix any fallout later"=2E I am still confused about the handling of F2008 backward compatibility, even more so after looking at the mentioned interp F08/0011=2E When referring to the published standard, this document really has a lot of "this does not seem to make sense=2E" or "This makes even less sense=2E= =2E=2E" It appears to be really tough on the F2008 text=2E At the risk of sounding stupid, but what line of interpretation do we normally follow? The published standard as-is, or rather take into account the interpretation, even if it says that the published document does not make sense? If I understood you correctly, you are trying to implement a backward compatibility, and the warning you emit refers to the pre-interp version=2E I haven't looked at the latest standard, but I guess you spent a lot of time on it: is there a difference between the interp version and the F2018 version? If not, wouldn't your/our life be easier if we focus on no-nonsense interpretations? Or is there a convincing reason to support the pre-interp variant? (From a practical point of view, a "F2018+ only" compliant finalization would be more than most competitors offer=2E=2E=2E :) Thanks, Harald Gesendet:=C2=A0Samstag, 07=2E Januar 2023 um 11:57 Uhr Von:=C2=A0"Paul Richard Thomas" An:=C2=A0"Harald Anlauf" Cc:=C2=A0"Jerry D" , "fortran" Betreff:=C2=A0Re: Fw: Re: [Patch, fortran] PR37336 (Finalization) - [F03] = Finish derived-type finalization Hi All, =C2=A0 Please find attached a patch for trans-array=2Ecc that does what Harald su= ggests; ie=2E finalization of array and structure constructors only occurs = with -std=3Df2003/8=2E Two versions of finalize_38=2Ef90 are attached=2E On= e which tests -std=3Dgnu/f20018 and the other -std=3Df2008=2E =C2=A0 Frankly, I think that this is better=2E Finalization of these expressions = must be handled with a lot of care and was deleted by f2018 for good reason= s=2E Above all else, the results do not represent defined entities and so i= t does not really make sense to finalize them=2E My vote is to go with this= version of the patch=2E =C2=A0 I am struggling a bit with a=C2=A0nit in finalize_45=2E One of the other p= rocessors appears to nullify the pointer component=C2=A0of the result of=C2= =A0construct_t during finalization of the result=2E I can see the sense in = this but do not find any requirement to do so in the standard=2E =C2=A0 Given the scale of the overall patch, I am beginning to have a lot of symp= athy with Thomas's suggestion that the finalization calls should be moved t= o the front end! I will take a quick look to see how easy this would be to = implement=2E =C2=A0 Regards =C2=A0 Paul =C2=A0=C2=A0 On Fri, 6 Jan 2023 at 08:34, Harald Anlauf via Fortran wrote:Hi Jerry, > Gesendet: Freitag, 06=2E Januar 2023 um 04:08 Uhr > Von: "Jerry D" > An: "Harald Anlauf" , "fortran"= > Betreff: Re: Fw: Re: [Patch, fortran] PR37336 (Finalization) - [F03] Fin= ish derived-type finalization > > On 1/5/23 1:14 PM, Harald Anlauf via Fortran wrote: > > Resending as plain text, as the original version did not appear on the= fortran list=2E=2E=2E > >=C2=A0 =C2=A0 > > > > Gesendet:=C2=A0Donnerstag, 05=2E Januar 2023 um 22:10 Uhr > > Von:=C2=A0"Harald Anlauf" > > An:=C2=A0"Paul Richard Thomas" > > Cc:=C2=A0"fortran@gcc=2Egnu=2Eorg[mailto:fortran@gcc=2Egnu=2Eorg]" , "Alessandro Fanfari= llo" , "Andrew Benson" , "Thomas Koenig" , "Damian Rouson" > > Betreff:=C2=A0Re: [Patch, fortran] PR37336 (Finalization) - [F03] Fini= sh derived-type finalization > > > > Dear Paul, all, > >=C2=A0 =C2=A0 > > I had a first look at the patch and the testcases, and I really look f= orward to getting this into gfortran=2E > >=C2=A0 =C2=A0 > > A few questions surfaced when playing with it, which is why am asking = for others to comment=2E > >=C2=A0 =C2=A0 > > Testcase finalize_38=2Ef90 exhibits a (potential) discrepancy to my ex= pections when playing with options -std=3Df2018 and -std=3Dgnu (the default= )=2E > >=C2=A0 =C2=A0 > > What is the expected behavior of -std=3Dgnu?=C2=A0 My expectation is t= hat -std=3Dgnu always corresponds to the latest implemented standard (curre= ntly F2018), except for possibly allowing for GNU-extensions=2E=C2=A0 This = might imply that corrigenda to a standard or a newer version may lead (over= time) to an adjustment of the behavior=2E=C2=A0 Any opinions on it?=C2=A0 = Do we need to always test (in the testsuite) for compliance with older stan= dards? > >=C2=A0 =C2=A0 > > My understanding is that -std=3Dgnu tends to be the least restrictive an= d > will allow finalize_38=2Ef90 to compile possibly with warnings=2E The > warnings are to allow the user to know thay are out of current > compliance, but we should not fail on code that was previously compliant > and less we specify -std=3Df2018 which is more restrictive=2E So if e=2Eg=2E finalize_38=2Ef90 compiles without warnings with -std=3Df20= 18, it should also compile without warnings with -std=3Dgnu, right? Harald > Jerry > >=C2=A0 =C2=A0-- "If you can't explain it simply, you don't understand it well enough" - Al= bert Einstein