2004-01-29 Aldy Hernandez <aldyh@redhat.com>
Backport:
2004-01-17 Fred Fish <fnf@intrinsity.com>
PR c++/11895
* cp/decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
except don't call array_type_nelts() with a VECTOR_TYPE.
From-SVN: r76914
+2004-01-29 Aldy Hernandez <aldyh@redhat.com>
+
+ Backport:
+
+ 2004-01-17 Fred Fish <fnf@intrinsity.com>
+
+ PR c++/11895
+ * cp/decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
+ except don't call array_type_nelts() with a VECTOR_TYPE.
+
2004-01-29 Aldy Hernandez <aldyh@redhat.com>
Backport:
}
}
}
- else if (TREE_CODE (type) == ARRAY_TYPE)
+ else if ((TREE_CODE (type) == ARRAY_TYPE)|| (TREE_CODE (type) == VECTOR_TYPE))
{
tree index;
tree max_index;
/* If the bound of the array is known, take no more initializers
than are allowed. */
- max_index = (TYPE_DOMAIN (type)
+ max_index = ((TYPE_DOMAIN (type) && (TREE_CODE (type) == ARRAY_TYPE))
? array_type_nelts (type) : NULL_TREE);
/* Loop through the array elements, gathering initializers. */
for (index = size_zero_node;