summaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-29 14:34:22 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-29 14:34:22 +0000
commit09426ab689b8dc34c447ee952496c2f60b710d80 (patch)
tree6c6ca2d903e9336dfcbe36e9d0b7d216bb748f01 /gcc/cp
parent487a9bc14daa5a587f0fd608a71e997d71790dfe (diff)
downloadgcc-09426ab689b8dc34c447ee952496c2f60b710d80.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175643 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/semantics.c2
-rw-r--r--gcc/cp/tree.c3
-rw-r--r--gcc/cp/typeck2.c2
4 files changed, 6 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 2f7b215d97b..e25f4e04490 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index d1af0c6bc2d..8121a0020b5 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -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;
}
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 31005084b3c..c50751f7ebb 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -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;
}
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 8bb938e46a8..023fab3321d 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -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))))