]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fortran: Remove unused field use_offset
authorMikael Morin <mikael@gcc.gnu.org>
Tue, 5 Aug 2025 15:11:03 +0000 (17:11 +0200)
committerMikael Morin <mikael@gcc.gnu.org>
Tue, 5 Aug 2025 15:11:03 +0000 (17:11 +0200)
The gfc_se::use_offset field is set in a few places, but is nowhere
used.  Remove it.

gcc/fortran/ChangeLog:

* trans.h (gfc_se): Remove field use_offset.
* trans-expr.cc (gfc_conv_intrinsic_to_class): Remove use_offset
initialization.
(gfc_conv_procedure_call): Likewise.
* trans-stmt.cc (trans_associate_var): Likewise.

gcc/fortran/trans-expr.cc
gcc/fortran/trans-stmt.cc
gcc/fortran/trans.h

index e6c32184435212a2ff1bb06e6d825fa72cf653ef..2dd093673ebf61607e0189f1abf81ced1a217517 100644 (file)
@@ -1168,7 +1168,6 @@ gfc_conv_intrinsic_to_class (gfc_se *parmse, gfc_expr *e,
       else
        {
          parmse->ss = ss;
-         parmse->use_offset = 1;
          gfc_conv_expr_descriptor (parmse, e);
 
          /* Array references with vector subscripts and non-variable expressions
@@ -7542,7 +7541,6 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
                        || CLASS_DATA (fsym)->attr.codimension))
            {
              /* Pass a class array.  */
-             parmse.use_offset = 1;
              gfc_conv_expr_descriptor (&parmse, e);
              bool defer_to_dealloc_blk = false;
 
index 4f2f4da2f2810ef8d70c25171d06a340ac529294..198acee1ba3e0446f2926d86c1df1f579f0a0b39 100644 (file)
@@ -2116,7 +2116,6 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block *block)
       if (sym->assoc->variable || cst_array_ctor)
        {
          se.direct_byref = 1;
-         se.use_offset = 1;
          se.expr = desc;
          GFC_DECL_PTR_ARRAY_P (sym->backend_decl) = 1;
        }
index 40680e97cbc9caedc25e50391911180600f1df5c..55541845a6d6bfc0e72f339a4ef3bbc3ba5adee1 100644 (file)
@@ -105,10 +105,6 @@ typedef struct gfc_se
   /* If set, will pass subref descriptors without a temporary.  */
   unsigned force_no_tmp:1;
 
-  /* Unconditionally calculate offset for array segments and constant
-     arrays in gfc_conv_expr_descriptor.  */
-  unsigned use_offset:1;
-
   unsigned want_coarray:1;
 
   /* Scalarization parameters.  */