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 347803858C56; Sat, 23 Apr 2022 20:27:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 347803858C56 X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.29] ([79.251.10.9]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N8ob6-1nv4F73qPm-015r11; Sat, 23 Apr 2022 22:27:04 +0200 Message-ID: <88c39110-ff0f-d06b-b331-133cb5213c67@gmx.de> Date: Sat, 23 Apr 2022 22:27:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v2] fortran: Detect duplicate unlimited polymorphic types [PR103662] Content-Language: en-US To: Mikael Morin , gfortran , gcc-patches Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: <8541b594-57c9-f6aa-7164-3918abe67a8f@orange.fr> From: Harald Anlauf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:YoIn5Ntmpk6kjLNuyMe6YEBwpY1LHrnFJZPclpVQGp5j22ZhZrw JiUBEHCKxdrogFeJmb46jDTzMFknAzg2S+ijSN5Plj5NvOTfjWR6teiFuz/4F2jF5P43wmB yCn0l4Bh9ouB6sexSe6UrL4/3851lwE7/Z6hHvRBK6Ibl2XXBv9ZQyyQeDlaBbDNRlSaMHS bHEyNA6QVMw97VJ2e8wnQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:/LYRrp/YIWo=:hna5EHfHbJe3t/C7IDs2G6 0wELLn3SYCGvfNuVX1dvDYeUVnB4PO0xcrIJbU80UzzG9NjR1QxfTpssbhjAcHK/vF1zWB2WP jhj8EeR/Yb4He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NED, DKIM_VALID, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP 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: Sat, 23 Apr 2022 20:27:08 -0000 Hi Mikael, Am 22.04.22 um 12:53 schrieb Mikael Morin: > Le 21/04/2022 =C3=A0 23:14, Mikael Morin a =C3=A9crit=C2=A0: >> Hello, >> >> this is a fix for PR103662, a TBAA issue with unlimited polymorphic >> types. >> >> I attached a draft patch to the PR which was accumulating all unlimited >> polymorphic symbols to a single namespace, avoiding duplicate symbols >> and thus eliminating the problem. >> >> After reviewing the code more in detail, I was afraid that some symbols >> could still end up in the local namespace, and that the problem would >> remain for them after all. >> >> Despite not being able to generate a testcase where it happened, I >> decided to produce a patch based on Jakub=E2=80=99s analysis in the PR = audit >> trail, as that way supports duplicates by design. >> >> On top of Jakub=E2=80=99s patch, there are a couple more types registra= tions >> just in case (they handle duplicates so that=E2=80=99s fine), and the t= ype >> comparison fix that he was too fortran-uncomfortable to do. >> >> The testcase had to be fixed as we found out in the PR audit trail. >> >> Regression tested on x86_64-pc-linux-gnu. OK for master? >> >> Mikael > > I have read Jakub=E2=80=99s analysis again, and it says the type registr= ation is > useless for unlimited polymorphic fake symbols, as they are all > translated as ptr_type_node. > So it can be dropped, which brings this v2 patch closer to Jakub=E2=80= =99s > original. > > Regression tested again. OK? LGTM. Thanks for the patch! Harald