public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: gcc-patches@gcc.gnu.org
Cc: fortran@gcc.gnu.org
Subject: Re: [PATCH, v2] Fortran: fix invalid rank error in ASSOCIATED when rank is remapped [PR77652]
Date: Fri, 29 Jul 2022 22:01:55 +0200	[thread overview]
Message-ID: <538a3d94-e015-334f-518d-0f024fbd61ba@gmx.de> (raw)
Message-ID: <20220729200155.-KPOwS3O-IaJ5FG6WcI3DU0cvrOMOf7-fGxw9Wo9xHA@z> (raw)
In-Reply-To: <5504785b-7471-f51e-852a-5ef9b039cc21@orange.fr>

Am 28.07.22 um 22:19 schrieb Mikael Morin:
> Hello,
> 
> Le 27/07/2022 à 21:45, Harald Anlauf via Fortran a écrit :
>> ok, I have thought about your comments in the review process,
>> and played with the Cray compiler.  Attached is a refined version
>> of the patch that now rejects in addition these cases for which there
>> are no possible related pointer assignments with bounds remapping:
>>
>>    ASSOCIATED (scalar, array) ! impossible, cannot remap bounds
>>    ASSOCIATED (array, scalar) ! a scalar is not simply contiguous
>>
> In principle, it could make sense to construct a one-sized array pointer 
> (of any rank) pointing to a scalar, but I agree that if we follow the 
> rules of the standard to the letter, it should be rejected (and we do 
> reject such a pointer assignment).
> So, with this case eliminated, this patch looks good to me as is.

OK, so I will push that version soon.

> Regarding Toon’s suggestion to ask the fortran committee, it sounds 
> sensible.  I propose to prepare something tomorrow.
> 

Depending on the answer we can later refine the compile-time check
and relax if needed.

Harald


  reply	other threads:[~2022-07-29 20:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-21 20:12 [PATCH] " Harald Anlauf
2022-07-25 10:43 ` Mikael Morin
2022-07-25 16:01   ` Harald Anlauf
2022-07-25 18:08     ` Mikael Morin
2022-07-25 20:18       ` Harald Anlauf
2022-07-26 19:25         ` Mikael Morin
2022-07-27 19:45           ` [PATCH, v2] " Harald Anlauf
2022-07-27 19:50             ` Toon Moene
2022-07-28 20:19             ` Mikael Morin
2022-07-29 20:01               ` Harald Anlauf [this message]
2022-07-29 20:01                 ` Harald Anlauf
     [not found]               ` <f2bce896-b3ef-b4c6-3267-ba870912849a@orange.fr>
     [not found]                 ` <bc5517e6-e69e-35d2-e9b2-005aa9499a34@orange.fr>
2022-08-18 19:32                   ` 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=538a3d94-e015-334f-518d-0f024fbd61ba@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /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).