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

commit b5448e0f1823bd23db2ee1c66ad388deca0f1fde
Author: Mikael Morin <[email protected]>
Date:   Wed Jul 15 22:35:10 2026 +0200

    Correction pr48611

Diff:
---
 gcc/fortran/trans-openmp.cc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gcc/fortran/trans-openmp.cc b/gcc/fortran/trans-openmp.cc
index 11fee8d9baba..50daee6280dd 100644
--- a/gcc/fortran/trans-openmp.cc
+++ b/gcc/fortran/trans-openmp.cc
@@ -794,7 +794,7 @@ gfc_walk_alloc_comps (tree decl, tree dest, tree var,
          if (GFC_DESCRIPTOR_TYPE_P (ftype)
              && GFC_TYPE_ARRAY_AKIND (ftype) == GFC_ARRAY_ALLOCATABLE)
            {
-             tem = gfc_conv_descriptor_data_get (unshare_expr (declf));
+             tem = unshare_expr (declf);
              tem = gfc_deallocate_with_status (tem, NULL_TREE, NULL_TREE,
                                                NULL_TREE, NULL_TREE, true,
                                                NULL,
@@ -1303,7 +1303,7 @@ gfc_omp_clause_assign_op (tree clause, tree dest, tree 
src)
       gfc_init_block (&cond_block);
       if (GFC_DESCRIPTOR_TYPE_P (type))
        {
-         tree tmp = gfc_conv_descriptor_data_get (unshare_expr (dest));
+         tree tmp = unshare_expr (dest);
          tmp = gfc_deallocate_with_status (tmp, NULL_TREE, NULL_TREE,
                                            NULL_TREE, NULL_TREE, true, NULL,
                                            GFC_CAF_COARRAY_NOCOARRAY);
@@ -1558,8 +1558,7 @@ gfc_omp_clause_dtor (tree clause, tree decl)
     {
       /* Allocatable arrays in FIRSTPRIVATE/LASTPRIVATE etc. clauses need
         to be deallocated if they were allocated.  */
-      tem = gfc_conv_descriptor_data_get (decl);
-      tem = gfc_deallocate_with_status (tem, NULL_TREE, NULL_TREE, NULL_TREE,
+      tem = gfc_deallocate_with_status (decl, NULL_TREE, NULL_TREE, NULL_TREE,
                                        NULL_TREE, true, NULL,
                                        GFC_CAF_COARRAY_NOCOARRAY);
     }

Reply via email to