public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: [PATCH, v2] Fortran: improve attribute conflict checking [PR93635]
Date: Fri, 24 May 2024 21:25:02 +0200	[thread overview]
Message-ID: <2ad83576-5a71-4478-b36c-fba0f478d3e4@gmx.de> (raw)
In-Reply-To: <3b43ac16-8924-44b8-8a7b-82ea99e8e98f@orange.fr>

Hi Mikael,

On 5/24/24 20:17, Mikael Morin wrote:
> Le 23/05/2024 à 21:15, Harald Anlauf a écrit :
>> Hi Mikael,
>>
>> On 5/23/24 09:49, Mikael Morin wrote:
>>> Le 13/05/2024 à 09:25, Mikael Morin a écrit :
>>>> Le 10/05/2024 à 21:56, Harald Anlauf a écrit :
>>>>> Am 10.05.24 um 21:48 schrieb Harald Anlauf:
>>>>>> Hi Mikael,
>>>>>>
>>>>>> Am 10.05.24 um 11:45 schrieb Mikael Morin:
>>>>>>> Le 09/05/2024 à 22:30, Harald Anlauf a écrit :
>>>>>>>> I'll stop here...
>>>>>>>>
>>>>>>> Thanks. Go figure, I have no problem reproducing today.
>>>>>>> It's PR99798 (and there is even a patch for it).
>>>>>>
>>>>>> this patch has rotten a bit: the type of gfc_reluease_symbol
>>>>>> has changed to bool, this can be fixed.
>>>>>>
>>>>>> Unfortunately, applying the patch does not remove the ICEs here...
>>>>>
>>>>> Oops, I take that back!  There was an error on my side applying the
>>>>> patch; and now it does fix the ICEs after correcting that hickup....
>>>>>
>>>> Now the PR99798 patch is ready to be pushed, but I won't be available
>>>> for a few days.  We can finish our discussion on this topic afterwards.
>>>>
>>> Hello,
>>>
>>> I'm coming back to this.
>>> I think either one of Steve's patch or your variant in the PR is a
>>> better fix for the ICE as a first step; they seem less fragile at least.
>>> Then we can look at a possible reordering of conflict checks as with the
>>> patch you originally submitted in this thread.
>>
>> like the attached variant?
>>
> Yes.  The churn in the testsuite is actually not that bad.
> OK for master, thanks for the patch.

thanks, will do.

> I wouldn't push for backporting, but if you feel like doing it, it seems 
> safe enough (depending on my own backport for PR99798 of course).

There's no pressing need.  I'll mark the patch as backportable
with dependency in my own list, in case the question comes up.

> Regarding the conflict check reordering, I'm tempted to just drop it at 
> this point, or do you think it remains worth it?

I don't really have a showcase where this would bring a benefit now,
so I'm dropping this idea.

There are issues where specifying a standard version changes
the error recovery path (or rather lead to an ICE), but as some
of these are due to emitting an error during parsing instead of
during resolution, my suggestion does not help there.

If you look for an example: this one is taken from pr101281

subroutine a3pr (xn) bind(C)
   character(len=n), pointer :: xn(..)
end

vs.

subroutine a3pr (xn) bind(C)
   character(len=n), pointer :: xn
   dimension :: xn(..)
end

The first one gives lots of invalid reads in valgrind with -std=f2008,
or ICEs, while the second does not.

Thanks,
Harald



WARNING: multiple messages have this Message-ID
From: Harald Anlauf <anlauf@gmx.de>
To: Mikael Morin <morin-mikael@orange.fr>,
	fortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH, v2] Fortran: improve attribute conflict checking [PR93635]
Date: Fri, 24 May 2024 21:25:02 +0200	[thread overview]
Message-ID: <2ad83576-5a71-4478-b36c-fba0f478d3e4@gmx.de> (raw)
Message-ID: <20240524192502.orZaJgV0KcaSIVSiLS8aCdHpREK2xU9cB4AiXyHTfvw@z> (raw)
In-Reply-To: <3b43ac16-8924-44b8-8a7b-82ea99e8e98f@orange.fr>

Hi Mikael,

On 5/24/24 20:17, Mikael Morin wrote:
> Le 23/05/2024 à 21:15, Harald Anlauf a écrit :
>> Hi Mikael,
>>
>> On 5/23/24 09:49, Mikael Morin wrote:
>>> Le 13/05/2024 à 09:25, Mikael Morin a écrit :
>>>> Le 10/05/2024 à 21:56, Harald Anlauf a écrit :
>>>>> Am 10.05.24 um 21:48 schrieb Harald Anlauf:
>>>>>> Hi Mikael,
>>>>>>
>>>>>> Am 10.05.24 um 11:45 schrieb Mikael Morin:
>>>>>>> Le 09/05/2024 à 22:30, Harald Anlauf a écrit :
>>>>>>>> I'll stop here...
>>>>>>>>
>>>>>>> Thanks. Go figure, I have no problem reproducing today.
>>>>>>> It's PR99798 (and there is even a patch for it).
>>>>>>
>>>>>> this patch has rotten a bit: the type of gfc_reluease_symbol
>>>>>> has changed to bool, this can be fixed.
>>>>>>
>>>>>> Unfortunately, applying the patch does not remove the ICEs here...
>>>>>
>>>>> Oops, I take that back!  There was an error on my side applying the
>>>>> patch; and now it does fix the ICEs after correcting that hickup....
>>>>>
>>>> Now the PR99798 patch is ready to be pushed, but I won't be available
>>>> for a few days.  We can finish our discussion on this topic afterwards.
>>>>
>>> Hello,
>>>
>>> I'm coming back to this.
>>> I think either one of Steve's patch or your variant in the PR is a
>>> better fix for the ICE as a first step; they seem less fragile at least.
>>> Then we can look at a possible reordering of conflict checks as with the
>>> patch you originally submitted in this thread.
>>
>> like the attached variant?
>>
> Yes.  The churn in the testsuite is actually not that bad.
> OK for master, thanks for the patch.

thanks, will do.

> I wouldn't push for backporting, but if you feel like doing it, it seems
> safe enough (depending on my own backport for PR99798 of course).

There's no pressing need.  I'll mark the patch as backportable
with dependency in my own list, in case the question comes up.

> Regarding the conflict check reordering, I'm tempted to just drop it at
> this point, or do you think it remains worth it?

I don't really have a showcase where this would bring a benefit now,
so I'm dropping this idea.

There are issues where specifying a standard version changes
the error recovery path (or rather lead to an ICE), but as some
of these are due to emitting an error during parsing instead of
during resolution, my suggestion does not help there.

If you look for an example: this one is taken from pr101281

subroutine a3pr (xn) bind(C)
   character(len=n), pointer :: xn(..)
end

vs.

subroutine a3pr (xn) bind(C)
   character(len=n), pointer :: xn
   dimension :: xn(..)
end

The first one gives lots of invalid reads in valgrind with -std=f2008,
or ICEs, while the second does not.

Thanks,
Harald


  reply	other threads:[~2024-05-24 19:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 19:33 [PATCH] " Harald Anlauf
2024-05-09 19:51 ` Mikael Morin
2024-05-09 20:30   ` Harald Anlauf
2024-05-09 20:30     ` Harald Anlauf
2024-05-10  9:45     ` Mikael Morin
2024-05-10 19:48       ` Harald Anlauf
2024-05-10 19:48         ` Harald Anlauf
2024-05-10 19:56         ` Harald Anlauf
2024-05-10 19:56           ` Harald Anlauf
2024-05-13  7:25           ` Mikael Morin
2024-05-23  7:49             ` Mikael Morin
2024-05-23 19:15               ` [PATCH, v2] " Harald Anlauf
2024-05-23 19:15                 ` Harald Anlauf
2024-05-24 18:17                 ` Mikael Morin
2024-05-24 19:25                   ` Harald Anlauf [this message]
2024-05-24 19:25                     ` Harald Anlauf
2024-05-23 20:32               ` [PATCH] " Mikael Morin

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=2ad83576-5a71-4478-b36c-fba0f478d3e4@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /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).