Skip to content
Snippets Groups Projects
Commit f5bfd4fa authored by sayle's avatar sayle
Browse files

	* 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.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120584 138bc75d-0d04-0410-961f-82ee72b054a4
parent ec0fa513
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment