https://gcc.gnu.org/g:95a5465ef76061341d5e107860d0c87b46eca50f

commit 95a5465ef76061341d5e107860d0c87b46eca50f
Author: Mikael Morin <mik...@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 0a114d0fc90e..d8e5a5bd41d8 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -12585,8 +12585,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))

Reply via email to