* tree.c (build_vec_init_expr): Don't add TARGET_EXPR.
* typeck2.c (digest_init_r): Handle VEC_INIT_EXPR.
* semantics.c (cxx_eval_vec_init_1): Correct type.
From-SVN: r175643
2011-06-29 Jason Merrill <jason@redhat.com>
+ * tree.c (build_vec_init_expr): Don't add TARGET_EXPR.
+ * typeck2.c (digest_init_r): Handle VEC_INIT_EXPR.
+ * semantics.c (cxx_eval_vec_init_1): Correct type.
+
* init.c (build_value_init): Decide whether or not to zero-initialize
based on user-providedness of default ctor, not any ctor.
(build_value_init_noctor): Adjust assert.
if (!*non_constant_p)
{
- init = build_constructor (TREE_TYPE (atype), n);
+ init = build_constructor (atype, n);
TREE_CONSTANT (init) = true;
return init;
}
VEC_INIT_EXPR_IS_CONSTEXPR (init) = true;
VEC_INIT_EXPR_VALUE_INIT (init) = value_init;
- init = build_target_expr (slot, init, complain);
- TARGET_EXPR_IMPLICIT_P (init) = 1;
-
return init;
}
{
/* Allow the result of build_array_copy and of
build_value_init_noctor. */
- if ((TREE_CODE (init) == TARGET_EXPR
+ if ((TREE_CODE (init) == VEC_INIT_EXPR
|| TREE_CODE (init) == CONSTRUCTOR)
&& (same_type_ignoring_top_level_qualifiers_p
(type, TREE_TYPE (init))))