Commit 20888def by Jason Merrill Committed by Jason Merrill

* tree.c (build_vec_init_elt): Strip TARGET_EXPR.

From-SVN: r176084
parent 5b696ba2
2011-07-09 Jason Merrill <jason@redhat.com>
* tree.c (build_vec_init_elt): Strip TARGET_EXPR.
2011-07-08 Jason Merrill <jason@redhat.com>
PR c++/45437
......
......@@ -511,6 +511,11 @@ build_vec_init_elt (tree type, tree init, tsubst_flags_t complain)
complain);
release_tree_vector (argvec);
/* For a trivial constructor, build_over_call creates a TARGET_EXPR. But
we don't want one here because we aren't creating a temporary. */
if (TREE_CODE (init) == TARGET_EXPR)
init = TARGET_EXPR_INITIAL (init);
return init;
}
......
2011-07-09 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/regress/regress5.C: New.
2011-07-08 Jason Merrill <jason@redhat.com>
PR c++/45437
......
// { dg-options -std=c++0x }
struct A
{
int i;
A(int);
};
struct B
{
virtual void f();
A ar[3];
};
extern B b;
B b2(b);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment