https://gcc.gnu.org/g:426057d23692c61b1060e18e8446e0cbecf1525a

commit 426057d23692c61b1060e18e8446e0cbecf1525a
Author: Mikael Morin <mik...@gcc.gnu.org>
Date:   Thu Jul 17 15:29:25 2025 +0200

    Suppression attribut unlimited_polymorphic

Diff:
---
 gcc/fortran/trans-array.cc | 5 +++--
 gcc/fortran/trans.h        | 3 ---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc
index 23f5152f64ea..5106c08b526a 100644
--- a/gcc/fortran/trans-array.cc
+++ b/gcc/fortran/trans-array.cc
@@ -7768,8 +7768,9 @@ gfc_conv_expr_descriptor (gfc_se *se, gfc_expr *expr)
       expr = expr->value.function.actual->expr;
     }
 
+  bool unlimited_polymorphic = false;
   if (!se->direct_byref)
-    se->unlimited_polymorphic = UNLIMITED_POLY (expr);
+    unlimited_polymorphic = UNLIMITED_POLY (expr);
 
   /* Special case things we know we can pass easily.  */
   switch (expr->expr_type)
@@ -8198,7 +8199,7 @@ gfc_conv_expr_descriptor (gfc_se *se, gfc_expr *expr)
          the offsets because all elements are within the array data.  */
 
       /* Set the dtype.  */
-      if (se->unlimited_polymorphic)
+      if (unlimited_polymorphic)
        dtype = gfc_get_dtype (TREE_TYPE (desc), &loop.dimen);
       else if (expr->ts.type == BT_ASSUMED)
        {
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h
index 798bf0e8a0dc..9ff7b2d12450 100644
--- a/gcc/fortran/trans.h
+++ b/gcc/fortran/trans.h
@@ -61,9 +61,6 @@ typedef struct gfc_se
      the reference to the class object here.  */
   tree class_container;
 
-  /* Whether expr is a reference to an unlimited polymorphic object.  */
-  unsigned unlimited_polymorphic:1;
-
   /* If set gfc_conv_variable will return an expression for the array
      descriptor. When set, want_pointer should also be set.
      If not set scalarizing variables will be substituted.  */

Reply via email to