Hi Mikael, I feel sure that most of these updates result from ad hoc fixes to PRs that were completely fixed later on or are remnants of old fixes. Thanks for doing all this cleanup work. As you said in the second message, let's see how it pans out.
The span field was initially introduced to deal with derived type array expressions with a component reference. OK for mainline Thanks for the patch Paul On Tue, 5 Aug 2025 at 13:58, Mikael Morin <morin-mik...@orange.fr> wrote: > From: Mikael Morin <mik...@gcc.gnu.org> > > These independant patches remove code generating isolated updates of the > array descriptor fields. > > The rationale for doing this is that updates of array descriptors should > always be complete. It doesn't make sense to generate part of the > update in one place, and do the rest somewhere else. > > Most of the patches are either wrong or redundant span updates. I hope > I'm not misinterpreting the meaning of the span field or the way it > should be used. > > Regression-tested on x86_64-pc-linux-gnu. > OK for master? > > Mikael Morin (6): > fortran: Remove span overwrite with pointer assignments > fortran: Remove redundant initialisation of associate variable span > fortran: Remove default initialization of local pointers's span > fortran: Remove premature initialization of a function result's span > fortran: Remove array bound update after constructor expansion > fortran: Remove overwrite of polymorphic associate variable offset > > gcc/fortran/trans-array.cc | 9 ------ > gcc/fortran/trans-decl.cc | 14 ---------- > gcc/fortran/trans-expr.cc | 5 ---- > gcc/fortran/trans-stmt.cc | 28 ------------------- > .../gfortran.dg/pointer_assign_16.f90 | 25 +++++++++++++++++ > 5 files changed, 25 insertions(+), 56 deletions(-) > create mode 100644 gcc/testsuite/gfortran.dg/pointer_assign_16.f90 > > -- > 2.47.2 > >