public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Thomas Koenig <tkoenig@netcologne.de>,
	fortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: improve checking of character length specification [PR96025]
Date: Tue, 21 Feb 2023 19:11:38 +0100	[thread overview]
Message-ID: <dd42864d-99af-a790-c202-af37745f83aa@gmx.de> (raw)
In-Reply-To: <1b3cbb1c-8994-09d0-7681-d997e9700302@netcologne.de>

Hi Thomas,

Am 21.02.23 um 08:19 schrieb Thomas Koenig via Gcc-patches:
> Hi Harald,
>
>> the attached patch fixes an ICE on invalid (non-integer)
>> specification expressions for character length in function
>> declarations.  It appears that the error handling was
>> already in place (mostly) and we need to essentially
>> prevent run-on errors.
>>
>> Regtested on x86_64-pc-linux-gnu.  OK for mainline?
> As a very minor matter of style, you might want to write
>
>            function_result_typed = check_function_result_typed ();
>
> instead of
>
>        if (check_function_result_typed ())
>          function_result_typed = true;

I was considering that too, but believed that the logic around
these places (a loop and an if) would confuse readers.
Thinking again and rechecking, I've changed the patch to follow
your suggestion, including a minor style cleanup.

Committed as:

https://gcc.gnu.org/g:6c1b825b3d6499dfeacf7c79dcf4b56a393ac204

commit r13-6265-g6c1b825b3d6499dfeacf7c79dcf4b56a393ac204
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Mon Feb 20 21:28:09 2023 +0100

> OK either way.
>
>> The PR is marked as a 10/11/12/13 regression, so I would
>> like to backport this as far as it seems reasonable.
>
> Also OK.
>
> Thanks for the patch!

Thanks for the review!

Harald


> Best regards
>
>      Thomas
>


      reply	other threads:[~2023-02-21 18:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 20:42 Harald Anlauf
2023-02-21  7:19 ` Thomas Koenig
2023-02-21 18:11   ` Harald Anlauf [this message]

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=dd42864d-99af-a790-c202-af37745f83aa@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tkoenig@netcologne.de \
    /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).