This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36059] -frepack-arrays: symbols w/ TARGET should not be repacked
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 May 2008 07:55:31 -0000
- Subject: [Bug fortran/36059] -frepack-arrays: symbols w/ TARGET should not be repacked
- References: <bug-36059-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2008-05-12 07:55 -------
There's only one place -frepack-arrays has an effect on, and it's easy enough
to change:
Index: trans-decl.c
===================================================================
--- trans-decl.c (revision 135088)
+++ trans-decl.c (working copy)
@@ -733,7 +733,10 @@ gfc_build_dummy_array_decl (gfc_symbol *
/* Create a descriptorless array pointer. */
as = sym->as;
packed = PACKED_NO;
- if (!gfc_option.flag_repack_arrays)
+
+ /* Even when -frepack-arrays is used, symbols with TARGET attribute
+ are not repacked. */
+ if (!gfc_option.flag_repack_arrays || sym->attr.target)
{
if (as->type == AS_ASSUMED_SIZE)
packed = PACKED_FULL;
Do you think there's anything more to do? Other attributes for which we might
want to do the same thing?
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2008-04-30 18:19:22 |2008-05-12 07:55:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36059