tree.c (build_vec_init_expr): Don't add TARGET_EXPR.
* 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
This commit is contained in:
parent
dfedbe4055
commit
1f2911476d
|
@ -1,5 +1,9 @@
|
|||
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.
|
||||
|
|
|
@ -6646,7 +6646,7 @@ cxx_eval_vec_init_1 (const constexpr_call *call, tree atype, tree init,
|
|||
|
||||
if (!*non_constant_p)
|
||||
{
|
||||
init = build_constructor (TREE_TYPE (atype), n);
|
||||
init = build_constructor (atype, n);
|
||||
TREE_CONSTANT (init) = true;
|
||||
return init;
|
||||
}
|
||||
|
|
|
@ -541,9 +541,6 @@ build_vec_init_expr (tree type, tree init, tsubst_flags_t complain)
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -925,7 +925,7 @@ digest_init_r (tree type, tree init, bool nested, int flags,
|
|||
{
|
||||
/* 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))))
|
||||
|
|
Loading…
Reference in New Issue