[gcc(refs/users/mikael/heads/refactor_descriptor_v03)] Correction typebound_operator_9.f90

Mikael Morin mikael@gcc.gnu.org
Fri Mar 14 16:16:52 GMT 2025


https://gcc.gnu.org/g:8fabf6231403b688f81657c3188e0d20f6e60195

commit 8fabf6231403b688f81657c3188e0d20f6e60195
Author: Mikael Morin <mikael@gcc.gnu.org>
Date:   Tue Feb 18 22:41:55 2025 +0100

    Correction typebound_operator_9.f90

Diff:
---
 gcc/fortran/trans-expr.cc | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index ad4d0bbad6e4..686b690fc1c3 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -12589,8 +12589,12 @@ gfc_trans_assignment_1 (gfc_expr * expr1, gfc_expr * expr2, bool init_flag,
       /* Walk the rhs.  */
       rss = gfc_walk_expr (expr2);
       if (rss == gfc_ss_terminator)
-	/* The rhs is scalar.  Add a ss for the expression.  */
-	rss = gfc_get_scalar_ss (gfc_ss_terminator, expr2);
+	{
+	  /* The rhs is scalar.  Add a ss for the expression.  */
+	  rss = gfc_get_scalar_ss (gfc_ss_terminator, expr2);
+	  lss->is_alloc_lhs = 0;
+	}
+
       /* When doing a class assign, then the handle to the rhs needs to be a
 	 pointer to allow for polymorphism.  */
       if (is_poly_assign && expr2->rank == 0 && !UNLIMITED_POLY (expr2))


More information about the Gcc-cvs mailing list