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
<fort...@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 via email to