diff options
author | Roger Sayle <roger@eyesopen.com> | 2007-01-20 20:12:44 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2007-01-20 20:12:44 +0000 |
commit | b01e2f88ef92c331a9df908212f7ec5ecd537908 (patch) | |
tree | 6d196f924038576c22983777c23d934bf69cf070 /gcc/fortran/trans-array.h | |
parent | 0eadc0917ab47b272102e3f337045c7fe8437a38 (diff) | |
download | gcc-b01e2f88ef92c331a9df908212f7ec5ecd537908.zip gcc-b01e2f88ef92c331a9df908212f7ec5ecd537908.tar.gz gcc-b01e2f88ef92c331a9df908212f7ec5ecd537908.tar.bz2 |
dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL, i.e.
* dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
i.e. that the ARRAY_REF doesn't mention components.
* trans-array.c (gfc_constant_array_constructor_p): Export external
function renamed from constant_array_constructor_p.
(gfc_build_constant_array_constructor): Export.
(gfc_trans_array_constructor): Update call to the renamed function
constant_array_constructor_p.
* trans-array.h (gfc_constant_array_constructor_p): Prototype here.
(gfc_build_constant_array_constructor): Likewise.
* trans-expr.c (gfc_build_memcpy_call): New helper function split
out from gfc_trans_array_copy.
(gfc_trans_array_copy): Use gfc_build_memcpy_call.
(gfc_trans_array_constructor_copy): New function to optimize
assigning an entire array from a constant array constructor.
(gfc_trans_assignment): Call gfc_trans_array_constructor_copy
when appropriate.
* gfortran.dg/array_memcpy_3.f90: New test case.
* gfortran.dg/vect/vect-5.f90: Update vectorized loop count.
From-SVN: r121010
Diffstat (limited to 'gcc/fortran/trans-array.h')
-rw-r--r-- | gcc/fortran/trans-array.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index 38ad123..278ea1e 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -133,3 +133,7 @@ tree gfc_conv_descriptor_ubound (tree, tree); /* Add pre-loop scalarization code for intrinsic functions which require special handling. */ void gfc_add_intrinsic_ss_code (gfc_loopinfo *, gfc_ss *); + +/* Functions for constant array constructor processing. */ +unsigned HOST_WIDE_INT gfc_constant_array_constructor_p (gfc_constructor *); +tree gfc_build_constant_array_constructor (gfc_expr *, tree); |