public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Mikael Morin <morin-mikael@orange.fr>,
	gfortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v2] fortran: Detect duplicate unlimited polymorphic types [PR103662]
Date: Sat, 23 Apr 2022 22:27:02 +0200	[thread overview]
Message-ID: <88c39110-ff0f-d06b-b331-133cb5213c67@gmx.de> (raw)
In-Reply-To: <ec2ecf94-0b7c-ccc3-7272-9bfb2a2750eb@orange.fr>

Hi Mikael,

Am 22.04.22 um 12:53 schrieb Mikael Morin:
> Le 21/04/2022 à 23:14, Mikael Morin a écrit :
>> 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’s analysis in the PR audit
>> trail, as that way supports duplicates by design.
>>
>> On top of Jakub’s patch, there are a couple more types registrations
>> just in case (they handle duplicates so that’s fine), and the type
>> 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’s analysis again, and it says the type registration 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’s
> original.
>
> Regression tested again. OK?

LGTM.

Thanks for the patch!

Harald

  reply	other threads:[~2022-04-23 20:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 21:14 [PATCH] " Mikael Morin
2022-04-22 10:53 ` [PATCH v2] " Mikael Morin
2022-04-23 20:27   ` Harald Anlauf [this message]
2022-04-25 11:38     ` [pushed] testsuite: add additional option to force DSE execution [PR103662] Mikael Morin
2022-04-25 12:12       ` Jakub Jelinek
2022-04-25 13:29         ` Mikael Morin
2022-04-25 20:35         ` Bernhard Reutner-Fischer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=88c39110-ff0f-d06b-b331-133cb5213c67@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=morin-mikael@orange.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).