My version of the REDUCE documentation was overly close to the
standard and so violated copyright. I will have another go.

Paul

On Thu, 16 Jul 2026 at 19:07, Jerry D <[email protected]> wrote:
>
> On 7/15/26 10:43 PM, Thomas Koenig wrote:
> > Hi Jerry,
> >
> >> While looking at other things I noticed what I think is dead code.
> >>
> >> libgfortran/intrinsics/reduce.c
> >>
> >>    bool masked = false;
> >>
> >> which is never changed.
> >>
> >> Farther down in the function:
> >>
> >>        if (masked && (ext != GFC_DESCRIPTOR_EXTENT (mask, i)))
> >>      {
> >>        int mext = (int)GFC_DESCRIPTOR_EXTENT (mask, i);
> >>        runtime_error ("shape mismatch between ARRAY and MASK in the REDUCE 
> >> "
> >>               "intrinsic (%" FLM_Z "d/%d)", ext, mext);
> >>      }
> >>
> >> I wonder if this is supposed have been mask_present?
> >
> > Very probably, following the logic. A (mismatching) test
> > case should confirm that.
> >
> > BTW, I just noticed that REDUCE seems to be missing from the
> > documentation.  That should be easy to add (and also to
> > backport to all branches where it has been implemented).
> >
> > Best regards
> >
> >      Thomas
> >
>
> I made that simple and obvious change and no regressions, so we are not
> exercising that check. I will have to look at our test cases to see if I can 
> add
> a check into one of them.
>
> Regards,
>
> Jerry

Reply via email to