https://gcc.gnu.org/g:b105a6e48523a4248b450106b85b62ad34c88212

commit b105a6e48523a4248b450106b85b62ad34c88212
Author: Mikael Morin <[email protected]>
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 db4033aa70d8..10ddd50bcade 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -12628,8 +12628,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