This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r120584 - in /trunk/gcc: fortran/ChangeLog fort...
- From: sayle at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Mon, 08 Jan 2007 17:56:38 -0000
- Subject: r120584 - in /trunk/gcc: fortran/ChangeLog fort...
Author: sayle
Date: Mon Jan 8 17:56:37 2007
New Revision: 120584
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120584
Log:
* trans-array.c (constant_array_constructor_p): New function to
determine whether an array constructor consists only of constant
elements, and if so return it's size.
(gfc_build_constant_array_constructor): Construct a statically
initialized gfortran array for a given EXPR_ARRAY.
(gfc_trans_constant_array_constructor): Efficiently scalarize
a constant array constructor.
(gfc_trans_array_constructor): Tidy up use of CONST_STRING.
Special case scalarization of constant array constructors, all of
whose elements are specified, using constant_array_constructor_p
and gfc_trans_constant_array_constructor.
(gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
before adding it to index, to avoid creating a NON_LVALUE_EXPR.
* gfortran.dg/array_constructor_14.f90: New test case.
* gfortran.dg/vect/vect-5.f90: Update test for improved alignment.
Added:
trunk/gcc/testsuite/gfortran.dg/array_constructor_14.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/vect/vect-5.f90