Commit 7ffacec4 by Richard Biener

decl.c (reshape_init_vector): For VECTOR_TYPEs...

2010-09-10  Richard Guenther  <rguenther@suse.de>

	* decl.c (reshape_init_vector): For VECTOR_TYPEs, use
	TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.

From-SVN: r164191
parent 77fcb50e
2010-09-10 Richard Guenther <rguenther@suse.de>
* decl.c (reshape_init_vector): For VECTOR_TYPEs, use
TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
2010-09-10 Jan Hubicka <jh@suse.cz>
PR tree-optimization/45605
* cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in ADDR_EXPR
* cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
ADDR_EXPR.
2010-09-08 Jakub Jelinek <jakub@redhat.com>
......
......@@ -4891,7 +4891,6 @@ static tree
reshape_init_vector (tree type, reshape_iter *d)
{
tree max_index = NULL_TREE;
tree rtype;
gcc_assert (TREE_CODE (type) == VECTOR_TYPE);
......@@ -4908,12 +4907,9 @@ reshape_init_vector (tree type, reshape_iter *d)
return value;
}
/* For a vector, the representation type is a struct
containing a single member which is an array of the
appropriate size. */
rtype = TYPE_DEBUG_REPRESENTATION_TYPE (type);
if (rtype && TYPE_DOMAIN (TREE_TYPE (TYPE_FIELDS (rtype))))
max_index = array_type_nelts (TREE_TYPE (TYPE_FIELDS (rtype)));
/* For a vector, we initialize it as an array of the appropriate size. */
if (TREE_CODE (type) == VECTOR_TYPE)
max_index = size_int (TYPE_VECTOR_SUBPARTS (type) - 1);
return reshape_init_array_1 (TREE_TYPE (type), max_index, d);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment