public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Richard Thomas <paul.richard.thomas@gmail.com>
To: Harald Anlauf <anlauf@gmx.de>
Cc: fortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fortran: improve bounds-checking for array sections [PR30802]
Date: Fri, 15 Sep 2023 10:13:06 +0100	[thread overview]
Message-ID: <CAGkQGiL3qE+0LkcHe4VEXFGiY6309ktw4q7b971ZvvZRJW3S6A@mail.gmail.com> (raw)
In-Reply-To: <trinity-a0926626-0e9e-4b9d-b9cf-a33b2b7eb9bb-1694722934093@3c-app-gmx-bs48>

Hi Harald,

The statement,

in array_bound_check_elemental is redundant since the call is
determined by a more restrictive condition.

+  if (!(gfc_option.rtcheck & GFC_RTCHECK_BOUNDS))
+    return;

Apart from that, it looks good to me. OK for mainline.

Thanks for the patch.

Paul

On Thu, 14 Sept 2023 at 21:22, Harald Anlauf via Fortran
<fortran@gcc.gnu.org> wrote:
>
> Dear all,
>
> array bounds checking was missing a few cases of array sections
> that are handled via gfc_conv_expr_descriptor.  Bounds checking
> was done for the dimensions with ranges, but not for elemental
> dimensions.
>
> The attached patch implements that and fixes pr30802 and also
> pr97039, maybe a few more similar cases.
>
> Regtested on x86_64-pc-linux-gnu.  OK for mainline?
>
> Thanks,
> Harald
>

  reply	other threads:[~2023-09-15  9:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-14 20:22 Harald Anlauf
2023-09-15  9:13 ` Paul Richard Thomas [this message]
2023-09-15 19:16   ` 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=CAGkQGiL3qE+0LkcHe4VEXFGiY6309ktw4q7b971ZvvZRJW3S6A@mail.gmail.com \
    --to=paul.richard.thomas@gmail.com \
    --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).