public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mikael Morin <morin-mikael@orange.fr>
To: Harald Anlauf <anlauf@gmx.de>, 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 10:41:25 +0200	[thread overview]
Message-ID: <f9d37d6e-2baa-4dd7-96ed-c71e6bbc509c@orange.fr> (raw)
In-Reply-To: <trinity-b7254ea8-17ae-420c-8b4a-756e3fe2a5f1-1693514575672@3c-app-gmx-bap28>

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.

May I suggest to handle functions the same way?

Thanks.

> Thanks,
> Harald
> 


  reply	other threads:[~2023-09-01  8:41 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 [this message]
2023-09-01 20:48   ` Harald Anlauf
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=f9d37d6e-2baa-4dd7-96ed-c71e6bbc509c@orange.fr \
    --to=morin-mikael@orange.fr \
    --cc=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).