https://gcc.gnu.org/g:bfa5761718d3742ba10dbec54c039454d0fe0089

commit bfa5761718d3742ba10dbec54c039454d0fe0089
Author: Mikael Morin <[email protected]>
Date:   Tue Oct 21 12:38:58 2025 +0200

    fortran: Use the setter to modify the array descriptor offset
    
    gcc/fortran/ChangeLog:
    
            * trans-array.cc (gfc_alloc_allocatable_for_assignment): Use the
            setter function to generate a modification of the array
            descriptor offset.

Diff:
---
 gcc/fortran/trans-array.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index e2b17a725be8..222ded188671 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -12094,8 +12094,7 @@ gfc_alloc_allocatable_for_assignment (gfc_loopinfo 
*loop,
   /* Set the lhs descriptor and scalarizer offsets.  For rank > 1,
      the array offset is saved and the info.offset is used for a
      running offset.  Use the saved_offset instead.  */
-  tmp = gfc_conv_descriptor_offset (desc);
-  gfc_add_modify (&fblock, tmp, offset);
+  gfc_conv_descriptor_offset_set (&fblock, desc, offset);
 
   /* Take into account _len of unlimited polymorphic entities, so that span
      for array descriptors and allocation sizes are computed correctly.  */

Reply via email to