public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>
Cc: fortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: error recovery while simplifying expressions [PR103707, PR106987]
Date: Wed, 6 Mar 2024 18:09:49 +0100	[thread overview]
Message-ID: <cbe17481-2efe-485c-a918-8830126f330c@gmx.de> (raw)
In-Reply-To: <CAGkQGiLZ9m1Jk=LYTX1QAG3GNm2XqvWn_bBzO_tG_dyPZ+m0Eg@mail.gmail.com>

Hi Paul,

thanks for reviewing the patch, and your trust in me :-)

Backporting to 13-branch seems easily feasible (needs another small
queued backport on which this patch depends), but going further is
definitely out of the question...  Will wait a couple of weeks though.

Harald

On 3/6/24 11:51, Paul Richard Thomas wrote:
> Hi Harald,
>
> This all looks good to me. OK for mainline and, according to intestinal
> fortitude on your part, earlier branches.
>
> Thanks
>
> Paul
>
>
> On Tue, 5 Mar 2024 at 21:24, Harald Anlauf <anlauf@gmx.de> wrote:
>
>> Dear all,
>>
>> error recovery on arithmetic errors during simplification has bugged
>> me for a long time, especially since the occurence of ICEs depended
>> on whether -frange-check is specified or not, whether array ctors
>> were involved, etc.
>>
>> I've now come up with the attached patch that classifies the arithmetic
>> result codes into "hard" and "soft" errors.
>>
>> A "soft" error means that it is an overflow or other exception (e.g. NaN)
>> that is ignored with -fno-range-check.  After the patch, a soft error
>> will not stop simplification (a hard one will), and error status will be
>> passed along.
>>
>> I took this opportunity to change the emitted error for division by zero
>> for real and complex division dependent on whether the numerator is
>> regular or not.  This makes e.g. (0.)/0 a NaN and now says so, in
>> accordance with some other brands.
>>
>> Regtested on x86_64-pc-linux-gnu.  OK for mainline?
>>
>> Other comments?
>>
>> Thanks,
>> Harald
>>
>>
>


WARNING: multiple messages have this Message-ID
From: Harald Anlauf <anlauf@gmx.de>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: [PATCH] Fortran: error recovery while simplifying expressions [PR103707, PR106987]
Date: Wed, 6 Mar 2024 18:09:49 +0100	[thread overview]
Message-ID: <cbe17481-2efe-485c-a918-8830126f330c@gmx.de> (raw)
Message-ID: <20240306170949.VXFR4neNAxFl09zSueheq_EeJtOXDnk8qLJnB9Gagm4@z> (raw)
In-Reply-To: <CAGkQGiLZ9m1Jk=LYTX1QAG3GNm2XqvWn_bBzO_tG_dyPZ+m0Eg@mail.gmail.com>

Hi Paul,

thanks for reviewing the patch, and your trust in me :-)

Backporting to 13-branch seems easily feasible (needs another small
queued backport on which this patch depends), but going further is
definitely out of the question...  Will wait a couple of weeks though.

Harald

On 3/6/24 11:51, Paul Richard Thomas wrote:
> Hi Harald,
> 
> This all looks good to me. OK for mainline and, according to intestinal
> fortitude on your part, earlier branches.
> 
> Thanks
> 
> Paul
> 
> 
> On Tue, 5 Mar 2024 at 21:24, Harald Anlauf <anlauf@gmx.de> wrote:
> 
>> Dear all,
>>
>> error recovery on arithmetic errors during simplification has bugged
>> me for a long time, especially since the occurence of ICEs depended
>> on whether -frange-check is specified or not, whether array ctors
>> were involved, etc.
>>
>> I've now come up with the attached patch that classifies the arithmetic
>> result codes into "hard" and "soft" errors.
>>
>> A "soft" error means that it is an overflow or other exception (e.g. NaN)
>> that is ignored with -fno-range-check.  After the patch, a soft error
>> will not stop simplification (a hard one will), and error status will be
>> passed along.
>>
>> I took this opportunity to change the emitted error for division by zero
>> for real and complex division dependent on whether the numerator is
>> regular or not.  This makes e.g. (0.)/0 a NaN and now says so, in
>> accordance with some other brands.
>>
>> Regtested on x86_64-pc-linux-gnu.  OK for mainline?
>>
>> Other comments?
>>
>> Thanks,
>> Harald
>>
>>
> 



  reply	other threads:[~2024-03-06 17:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05 21:23 [PATCH] Fortran: error recovery while simplifying expressions [PR103707,PR106987] Harald Anlauf
2024-03-06 10:51 ` Paul Richard Thomas
2024-03-06 17:09   ` Harald Anlauf [this message]
2024-03-06 17:09     ` [PATCH] Fortran: error recovery while simplifying expressions [PR103707, PR106987] Harald Anlauf

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=cbe17481-2efe-485c-a918-8830126f330c@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=paul.richard.thomas@gmail.com \
    /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).