[gcc(refs/users/mikael/heads/refactor_descriptor_v05)] Correction régression pr78260-3
Mikael Morin
mikael@gcc.gnu.org
Fri Jun 13 15:06:32 GMT 2025
https://gcc.gnu.org/g:6c126992285f55f3c0e70bf4f9c45ef5cbbb4c8f
commit 6c126992285f55f3c0e70bf4f9c45ef5cbbb4c8f
Author: Mikael Morin <mikael@gcc.gnu.org>
Date: Sun May 18 20:40:08 2025 +0200
Correction régression pr78260-3
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 8e1dcbb8c1ec..6fffb5315742 100644
--- a/gcc/fortran/trans-decl.cc
+++ b/gcc/fortran/trans-decl.cc
@@ -1343,12 +1343,7 @@ 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 (as->type == AS_ASSUMED_SIZE && !is_classarray)
- packed = PACKED_FULL;
- }
- else
+ if (flag_repack_arrays && !sym->attr.target)
{
if (as->type == AS_EXPLICIT)
{
@@ -1368,6 +1363,11 @@ 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