[gcc(refs/users/mikael/heads/refactor_descriptor_v05)] Correction partielle allocate_with_source_11
Mikael Morin
mikael@gcc.gnu.org
Fri Jun 13 15:06:01 GMT 2025
https://gcc.gnu.org/g:6159d10c3a2fbc0e5dba6b9de7bf5c7d1db3485e
commit 6159d10c3a2fbc0e5dba6b9de7bf5c7d1db3485e
Author: Mikael Morin <mikael@gcc.gnu.org>
Date: Sun May 18 15:02:49 2025 +0200
Correction partielle allocate_with_source_11
Diff:
---
gcc/fortran/trans-expr.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index 63ab730cc355..255ed2711da5 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -1357,6 +1357,10 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts,
if (gfc_is_class_array_function (e)
&& parmse->class_vptr != NULL_TREE)
tmp = parmse->class_vptr;
+ else if (parmse->class_container != NULL_TREE)
+ /* Don't redundantly evaluate the expression if the required information
+ is already available. */
+ tmp = parmse->class_container;
else if (class_ref == NULL
&& e->symtree && e->symtree->n.sym->ts.type == BT_CLASS)
{
@@ -1370,10 +1374,6 @@ gfc_conv_class_to_class (gfc_se *parmse, gfc_expr *e, gfc_typespec class_ts,
slen = build_zero_cst (size_type_node);
}
- else if (parmse->class_container != NULL_TREE)
- /* Don't redundantly evaluate the expression if the required information
- is already available. */
- tmp = parmse->class_container;
else
{
/* Remove everything after the last class reference, convert the
More information about the Gcc-cvs
mailing list