https://gcc.gnu.org/g:652f3b3bcae918b62424f585745c5da7d55ecdba
commit 652f3b3bcae918b62424f585745c5da7d55ecdba 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 d6651b31a40f..b0ec114bf66f 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. */