From: Tobias Burnus <tobias@codesourcery.com>
To: Mikael Morin <morin-mikael@orange.fr>,
gfortran <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Cc: Harald Anlauf <anlauf@gmx.de>
Subject: Re: [PATCH] fortran: Avoid infinite self-recursion [PR105381]
Date: Tue, 26 Apr 2022 15:22:08 +0200 [thread overview]
Message-ID: <4567d0f0-3077-d582-e2d2-b0169c322009@codesourcery.com> (raw)
In-Reply-To: <8f082ce4-a6a9-72c1-a882-4663426adaff@orange.fr>
LGTM - however:
On 26.04.22 14:38, Mikael Morin wrote:
> --- a/gcc/fortran/trans-array.cc
> +++ b/gcc/fortran/trans-array.cc
> @@ -3698,7 +3698,8 @@ non_negative_strides_array_p (tree expr)
> if (DECL_P (expr)
> && DECL_LANG_SPECIFIC (expr))
> if (tree orig_decl = GFC_DECL_SAVED_DESCRIPTOR (expr))
> - return non_negative_strides_array_p (orig_decl);
> + if (orig_decl != expr)
> + return non_negative_strides_array_p (orig_decl);
Is the if()if()if() cascade really needed? I can see a reason that an
extra 'if' is preferred for the variable declaration of orig_decl, but
can't we at least put the new 'orig_decl != expr' with an '&&' into the
same if as the decl/in the second if? Besides clearer, it also avoids
further identing the return line.
Thanks,
Tobias
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955
next prev parent reply other threads:[~2022-04-26 13:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 12:38 Mikael Morin
2022-04-26 13:22 ` Tobias Burnus [this message]
2022-04-26 13:32 ` Jakub Jelinek
2022-04-26 17:12 ` Mikael Morin
2022-04-26 17:28 ` Jakub Jelinek
2022-04-26 19:10 ` [PATCH v2] " Mikael Morin
2022-04-26 20:04 ` Harald Anlauf
2022-04-26 20:04 ` 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=4567d0f0-3077-d582-e2d2-b0169c322009@codesourcery.com \
--to=tobias@codesourcery.com \
--cc=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).