+2005-03-08 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/20142
+ * init.c (build_vec_init): When determining whether or not the
+ element type has an asignment operator, look through all array
+ dimensions.
+
2005-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/19311
tree atype = TREE_TYPE (base);
/* The type of an element in the array. */
tree type = TREE_TYPE (atype);
+ /* The element type reached after removing all outer array
+ types. */
+ tree inner_elt_type;
/* The type of a pointer to an element in the array. */
tree ptype;
tree stmt_expr;
if (maxindex == NULL_TREE || maxindex == error_mark_node)
return error_mark_node;
+ inner_elt_type = strip_array_types (atype);
if (init
&& (from_array == 2
- ? (!CLASS_TYPE_P (type) || !TYPE_HAS_COMPLEX_ASSIGN_REF (type))
+ ? (!CLASS_TYPE_P (inner_elt_type)
+ || !TYPE_HAS_COMPLEX_ASSIGN_REF (inner_elt_type))
: !TYPE_NEEDS_CONSTRUCTING (type))
&& ((TREE_CODE (init) == CONSTRUCTOR
/* Don't do this if the CONSTRUCTOR might contain something
that might throw and require us to clean up. */
&& (CONSTRUCTOR_ELTS (init) == NULL_TREE
- || ! TYPE_HAS_NONTRIVIAL_DESTRUCTOR (target_type (type))))
+ || ! TYPE_HAS_NONTRIVIAL_DESTRUCTOR (inner_elt_type)))
|| from_array))
{
/* Do non-default initialization of POD arrays resulting from
+2005-03-08 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/20142
+ * g++.dg/init/array18.C: New test.
+
2005-03-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/19311