public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Mikael Morin <morin-mikael@orange.fr>,
	fortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: runtime bounds-checking in presence of array constructors [PR31059]
Date: Fri, 1 Sep 2023 22:48:34 +0200	[thread overview]
Message-ID: <fc5895ae-7c98-4bd1-be54-d34a005d6994@gmx.de> (raw)
In-Reply-To: <f9d37d6e-2baa-4dd7-96ed-c71e6bbc509c@orange.fr>

Hi Mikael,

On 9/1/23 10:41, Mikael Morin via Gcc-patches wrote:
> Le 31/08/2023 à 22:42, Harald Anlauf via Fortran a écrit :
>> Dear all,
>>
>> gfortran's array bounds-checking code does a mostly reasonable
>> job for array sections in expressions and assignments, but
>> forgot the case that (rank-1) expressions can involve array
>> constructors, which have a shape ;-)
>>
>> The attached patch walks over the loops generated by the
>> scalarizer, checks for the presence of a constructor, and
>> takes the first shape found as reference.  (If several
>> constructors are present, discrepancies in their shape
>> seems to be already detected at compile time).
>>
>> For more details on what will be caught now see testcase.
>>
>> Regtested on x86_64-pc-linux-gnu.  OK for mainline?
>>
> This is OK.

I've pushed this is the first step.

> May I suggest to handle functions the same way?

I'll have a look at them, but will need to gather a few
suitable testcases first.

Thanks for the review!

Harald

>
> Thanks.
>
>> Thanks,
>> Harald
>>
>
>


  reply	other threads:[~2023-09-01 20:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31 20:42 Harald Anlauf
2023-09-01  8:41 ` Mikael Morin
2023-09-01 20:48   ` Harald Anlauf [this message]
2023-09-08  9:33     ` Mikael Morin

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=fc5895ae-7c98-4bd1-be54-d34a005d6994@gmx.de \
    --to=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).