public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Tobias Burnus <tobias@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Re: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]
Date: Tue, 28 Sep 2021 21:15:38 +0200	[thread overview]
Message-ID: <trinity-572e914f-329b-40e2-85bb-52ccf24433a2-1632856538933@3c-app-gmx-bs02> (raw)
In-Reply-To: <8e95ecf2-768c-b80e-ff62-5a94f6ed52fe@codesourcery.com>

Hi Tobias,

let me first reach for my brown bag...

> Otherwise, the quote from F2018 of my previous email applies:
>
> F2018:16.9.109 LBOUND has for "case(i)", i.e. with a 'dim'
> argument the following. The case without 'dim' just iterates
> through case (i) for each dim. Thus:
>
> "If DIM is present,
>   ARRAY is a whole array,
>   and either ARRAY is an assumed-size array of rank DIM
>       or dimension DIM of ARRAY has nonzero extent,
>   the result has a value equal to the lower bound for subscript DIM of ARRAY.
> Otherwise, if DIM is present, the result value is 1."

It was probably too late, and I could no longer distinguish
"assumed-size" from "assumed-rank", and likely some more...

> Here, we assume dim=2 is present [either directly or via case(ii)],
> ARRAY is a whole array but it neither is of assumed size nor has nonzero
> extent.
> Hence, the "otherwise" applies and the result is 1 - as gfortran has
> and ifort has in the caller.

... which lead to my complete confusion and loss of focus.

Of course you are right.  Sorry for that.  Will now put that bag on...

Harald


  reply	other threads:[~2021-09-28 19:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 12:26 Tobias Burnus
2021-09-24 20:38 ` Thomas Koenig
2021-09-27 12:07   ` Tobias Burnus
2021-09-27 12:38     ` [committed] libgomp.oacc-fortran/privatized-ref-2.f90: Fix dg-note (was: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]) Tobias Burnus
2021-09-28 12:29       ` Thomas Schwinge
2021-09-27 19:34     ` [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070] Harald Anlauf
2021-09-28  6:40       ` Tobias Burnus
2021-09-28 19:15         ` Harald Anlauf [this message]
2021-09-28 12:30     ` Thomas Schwinge

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=trinity-572e914f-329b-40e2-85bb-52ccf24433a2-1632856538933@3c-app-gmx-bs02 \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tobias@codesourcery.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).