diff options
author | Richard Biener <rguenth@gcc.gnu.org> | 2010-09-10 15:37:13 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2010-09-10 15:37:13 +0000 |
commit | 7ffacec467f1808218d1129c62423684455da2ac (patch) | |
tree | fcbdaba745bcf101294f572bab22ae197013e509 | |
parent | 77fcb50eced279547ad891c2ec9c8cb65baae90d (diff) | |
download | gcc-7ffacec467f1808218d1129c62423684455da2ac.zip gcc-7ffacec467f1808218d1129c62423684455da2ac.tar.gz gcc-7ffacec467f1808218d1129c62423684455da2ac.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/cp/decl.c | 10 |
2 files changed, 10 insertions, 8 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 54d0ef6..a5d46a8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,7 +1,13 @@ +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> diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index ad4a097..8ca69da 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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); } |