public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>
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 21:16:56 +0200	[thread overview]
Message-ID: <48c24c0b-5f3e-4858-bf0c-45180e5eb834@gmx.de> (raw)
In-Reply-To: <CAGkQGiL3qE+0LkcHe4VEXFGiY6309ktw4q7b971ZvvZRJW3S6A@mail.gmail.com>

Hi Paul,

On 9/15/23 11:13, Paul Richard Thomas via Gcc-patches wrote:
> 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;

yeah, this was left over from playing, since I thought
the outlined function could be used more than once.
I've removed those lines before pushing.

Thanks for the review!

Harald

> 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 19:16 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
2023-09-15 19:16   ` Harald Anlauf [this message]

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=48c24c0b-5f3e-4858-bf0c-45180e5eb834@gmx.de \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=paul.richard.thomas@gmail.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).