OK.  Sorry about dropping the balli on a review.
I thought it had already been approved and committed.

-- 
steve

On Fri, Sep 13, 2024 at 12:19:48PM +0200, Mikael Morin wrote:
> Ping:
> 
> https://gcc.gnu.org/pipermail/fortran/2024-July/060640.html
> 
> Maybe I could argue that I can self approve, as the patch is a partial
> revert an old patch of mine:
> 
> https://gcc.gnu.org/r180889
> 
> Le 07/07/2024 à 11:00, Mikael Morin a écrit :
> > Hello,
> > 
> > this is another small cleanup I had lying around.
> > Regression-tested on x86_64-linux.  Ok for master?
> > 
> > -- 8< --
> > 
> > Remove the special handling of end of nested scalarization chains, which
> > advanced the chain to an element of a parent chain when the current one
> > was reaching its end.
> > 
> > That handling was superfluous as nested chains correspond to nested
> > scalarizations of subexpressions and the scalarizations don't extend beyond
> > their associated subexpression and don't use any scalarisation element from
> > the parent expression.
> > 
> > No change of behaviour, as the GFC_SE struct is supposed to be in its final
> > state anyway when the last element from the chain has been consumed.
> > 
> > gcc/fortran/ChangeLog:
> > 
> >     * trans-expr.cc (gfc_advance_se_ss_chain): Don't use an element
> >     from the parent scalarization chain when the current chain reaches
> >     its end.
> > ---
> >   gcc/fortran/trans-expr.cc | 11 +----------
> >   1 file changed, 1 insertion(+), 10 deletions(-)
> > 
> > diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
> > index 477c2720187..f0862db5f17 100644
> > --- a/gcc/fortran/trans-expr.cc
> > +++ b/gcc/fortran/trans-expr.cc
> > @@ -2052,7 +2052,6 @@ void
> >   gfc_advance_se_ss_chain (gfc_se * se)
> >   {
> >     gfc_se *p;
> > -  gfc_ss *ss;
> >     gcc_assert (se != NULL && se->ss != NULL && se->ss != 
> > gfc_ss_terminator);
> > @@ -2064,15 +2063,7 @@ gfc_advance_se_ss_chain (gfc_se * se)
> >         gcc_assert (p->parent == NULL || p->parent->ss == p->ss
> >               || p->parent->ss->nested_ss == p->ss);
> > -      /* If we were in a nested loop, the next scalarized expression can be
> > -    on the parent ss' next pointer.  Thus we should not take the next
> > -    pointer blindly, but rather go up one nest level as long as next
> > -    is the end of chain.  */
> > -      ss = p->ss;
> > -      while (ss->next == gfc_ss_terminator && ss->parent != NULL)
> > -   ss = ss->parent;
> > -
> > -      p->ss = ss->next;
> > +      p->ss = p->ss->next;
> >         p = p->parent;
> >       }

-- 
Steve

Reply via email to