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);
 }