public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: Mikael Morin <morin-mikael@orange.fr>,
	fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org,
	Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
Subject: Re: [PATCH v2] Fortran: Narrow return types [PR78798]
Date: Sun, 14 May 2023 17:24:28 +0200	[thread overview]
Message-ID: <20230514172428.2ff11996@nbbrfq> (raw)
In-Reply-To: <284716f0-fe76-dc88-e5be-4af0f65e13f4@netcologne.de>

On Sun, 14 May 2023 15:04:15 +0200
Thomas Koenig <tkoenig@netcologne.de> wrote:

> On 14.05.23 14:27, Mikael Morin wrote:
> > 
> > (...)  
> >> @@ -2098,7 +2098,7 @@ ref_same_as_full_array (gfc_ref *full_ref, 
> >> gfc_ref *ref)
> >>           there is some kind of overlap.
> >>       0 : array references are identical or not overlapping.  */
> >> -int
> >> +bool
> >>   gfc_dep_resolver (gfc_ref *lref, gfc_ref *rref, gfc_reverse *reverse,
> >>             bool identical)
> >>   {  
> > 
> > The function comment states that the function may return 2, which 
> > doesn't seem to be the case any more.  
> 
> Hm, this makes me a litte suspicious.  Was functionality for reversing
> loops lost,  maybe unintentionally?  I assume that, at some time, we did
> use the '2' as return value (or did we?)

There was 7c428aa29d75ef163c334cf3974f87b3630d8b8b (a revert because it
miscompiled spec2k) which might have associated the comment of the
former static gfc_dependency dep_ref (gfc_ref *lref, gfc_ref *rref,
gfc_reverse *reverse) to the current gfc_dep_resolver.

The commit which introduced the return value 2 documentation was
3d03ead0b8273efde57f6194617b35111a84b05d 
"re PR fortran/24524 (Fortran dependency checking should reverse loops)"

but TBH i don't see how it returned 2 in that revision?
Looks like when writing that patch it deemed useful to return 2 for
this specific situation but in the end it was dropped but the comment
survived.

I will update the comment to document the true / false return values.

And Mikael, do you want me to cleanup 1/0 to true/false assignments for
the boolean variables, or can we do that in a separate patch (or not at
all right now)?

many thanks for the reviews!

  reply	other threads:[~2023-05-14 15:24 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12 23:45 [PATCH 0/5] function result decl location; type demotion Bernhard Reutner-Fischer
2022-11-12 23:45 ` [PATCH 1/5] c: Set the locus of the function result decl Bernhard Reutner-Fischer
2022-11-14 21:25   ` Joseph Myers
2022-11-12 23:45 ` [PATCH 2/5] c++: " Bernhard Reutner-Fischer
2022-11-15 23:52   ` Jason Merrill
2022-11-17  8:56     ` Bernhard Reutner-Fischer
2022-11-17 14:53       ` Jason Merrill
2022-11-17 19:02         ` Bernhard Reutner-Fischer
2022-11-17 23:52           ` Jason Merrill
2022-11-18 10:49             ` Bernhard Reutner-Fischer
2022-11-18 16:06               ` Jason Merrill
2022-11-18 18:26                 ` Bernhard Reutner-Fischer
2022-11-19  9:56                 ` Bernhard Reutner-Fischer
2022-11-20 17:06                   ` Bernhard Reutner-Fischer
2022-11-22 20:25                     ` Jason Merrill
2022-11-23 15:28                       ` Jason Merrill
2022-12-02 19:30                         ` Jason Merrill
2022-12-02 19:55                           ` Bernhard Reutner-Fischer
2022-11-12 23:45 ` [PATCH 3/5] Fortran: Narrow return types [PR78798] Bernhard Reutner-Fischer
2022-11-13 10:13   ` Janne Blomqvist
2022-11-13 10:39     ` Bernhard Reutner-Fischer
2022-11-13 20:29       ` Harald Anlauf
2022-11-13 20:29         ` Harald Anlauf
2022-11-13 21:50         ` Bernhard Reutner-Fischer
2023-05-10 16:47           ` [PATCH v2] " Bernhard Reutner-Fischer
2023-05-14 12:27             ` Mikael Morin
2023-05-14 13:04               ` Thomas Koenig
2023-05-14 15:24                 ` Bernhard Reutner-Fischer [this message]
2023-05-14 18:06                   ` Mikael Morin
2023-05-18 19:52               ` Bernhard Reutner-Fischer
2022-11-12 23:45 ` [PATCH 4/5] value-range: Add as_string diagnostics helper Bernhard Reutner-Fischer
2022-11-12 23:55   ` Andrew Pinski
2022-11-17  3:30     ` Jeff Law
2022-11-12 23:45 ` [PATCH 5/5] gimple: Add pass to note possible type demotions; IPA pro/demotion; DO NOT MERGE 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=20230514172428.2ff11996@nbbrfq \
    --to=rep.dot.nop@gmail.com \
    --cc=aldot@gcc.gnu.org \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=morin-mikael@orange.fr \
    --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).