https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120812

--- Comment #7 from kargls at comcast dot net ---
(In reply to anlauf from comment #6)
> (In reply to kargls from comment #5)
> > (In reply to kargls from comment #4)
> > > (In reply to anlauf from comment #3)
> > > 
> > > troutmask:sgk[215] gfcx --version
> > > GNU Fortran (GCC) 16.0.0 20250528 (experimental)
> > > 
> > 
> > There are a couple of string related patches after 20250528.
> > I'm rebuilding gcc now to get to top-of-tree to see if the
> > issue is fixed in newer gfortran.
> 
> May be related to the issue with SAVEd allocatable character?

Just completed the build.  The testcase passes and I see

  *(str + 10) = 10;

in the dump.  It's possibly fixed by one of

2025-06-19  Mikael Morin  <mik...@gcc.gnu.org>

        PR fortran/120713
        * trans-array.cc (gfc_trans_deferred_array): Statically
        initialize deferred length variable for SAVEd character arrays.


2025-06-04  Andre Vehreschild  <ve...@gcc.gnu.org>

        PR fortran/120483
        * trans-expr.cc (gfc_conv_substring): Use pointer arithmetic on
        static allocatable char arrays.


I don't have a 15.1 tree here, so don't know if Mikael and Andre backported
their patches.

Reply via email to