[gcc(refs/users/mikael/heads/refactor_descriptor_v05)] Revert "Correction régression pr78260-3"

Mikael Morin mikael@gcc.gnu.org
Mon May 19 17:26:29 GMT 2025


https://gcc.gnu.org/g:441e127e05c8243a3760263f8a74f43d4dad9045

commit 441e127e05c8243a3760263f8a74f43d4dad9045
Author: Mikael Morin <mikael@gcc.gnu.org>
Date:   Mon May 19 19:21:22 2025 +0200

    Revert "Correction régression pr78260-3"
    
    This reverts commit 449e41b363db2e482c912541214d43437f2e0dce.

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

diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc
index 3b8f8a538899..7fcb50fcb685 100644
--- a/gcc/fortran/trans-decl.cc
+++ b/gcc/fortran/trans-decl.cc
@@ -1343,7 +1343,12 @@ gfc_build_dummy_array_decl (gfc_symbol * sym, tree dummy)
 
       /* Even when -frepack-arrays is used, symbols with TARGET attribute
 	 are not repacked.  */
-      if (flag_repack_arrays && !sym->attr.target)
+      if (!flag_repack_arrays || sym->attr.target)
+	{
+	  if (as->type == AS_ASSUMED_SIZE && !is_classarray)
+	    packed = PACKED_FULL;
+	}
+      else
 	{
 	  if (as->type == AS_EXPLICIT)
 	    {
@@ -1363,11 +1368,6 @@ gfc_build_dummy_array_decl (gfc_symbol * sym, tree dummy)
 	  else
 	    packed = PACKED_PARTIAL;
 	}
-      else if ((as->type == AS_ASSUMED_SIZE && !is_classarray)
-	       || ((sym->attr.result || sym->attr.function)
-		   && sym->ts.type != BT_CLASS
-		   && !sym->attr.pointer))
-	packed = PACKED_FULL;
 
       /* For classarrays the element type is required, but
 	 gfc_typenode_for_spec () returns the array descriptor.  */


More information about the Gcc-cvs mailing list