dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL, i.e.
authorRoger Sayle <roger@eyesopen.com>
Sat, 20 Jan 2007 20:12:44 +0000 (20:12 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sat, 20 Jan 2007 20:12:44 +0000 (20:12 +0000)
commitb01e2f88ef92c331a9df908212f7ec5ecd537908
tree6d196f924038576c22983777c23d934bf69cf070
parent0eadc0917ab47b272102e3f337045c7fe8437a38
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
gcc/fortran/ChangeLog
gcc/fortran/dependency.c
gcc/fortran/trans-array.c
gcc/fortran/trans-array.h
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/array_memcpy_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/vect/vect-5.f90