aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2008-05-14 21:44:36 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2008-05-14 21:44:36 +0000
commit1c3339af10c27fafd9573c0a77c79144e23ebc51 (patch)
tree1d799f9b345a459f5af51f936f09660ec4966c47 /gcc/fortran
parent6401bf9cad029c264ff65db946c8e31ce998db13 (diff)
downloadgcc-1c3339af10c27fafd9573c0a77c79144e23ebc51.zip
gcc-1c3339af10c27fafd9573c0a77c79144e23ebc51.tar.gz
gcc-1c3339af10c27fafd9573c0a77c79144e23ebc51.tar.bz2
re PR fortran/36059 (-frepack-arrays: symbols w/ TARGET should not be repacked)
PR fortran/36059 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack arrays that have the TARGET attribute. * gfortran.dg/repack_arrays_1.f90: New test. From-SVN: r135310
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-decl.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index c38717c..c39b86e 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,11 @@
2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+ PR fortran/36059
+ * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
+ arrays that have the TARGET attribute.
+
+2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
PR fortran/36186
* simplify.c (only_convert_cmplx_boz): New function.
(gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 6e0b542..aa3712c 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -733,7 +733,10 @@ gfc_build_dummy_array_decl (gfc_symbol * sym, tree dummy)
/* 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;