* call.c (build_aggr_conv): Reject value-initialization of reference.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@207183
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-01-27 Jason Merrill <jason@redhat.com>
+
+ PR c++/58639
+ * call.c (build_aggr_conv): Reject value-initialization of reference.
+
2013-10-25 Tom de Vries <tom@codesourcery.com>
PR c++/58282
if (i < CONSTRUCTOR_NELTS (ctor))
val = CONSTRUCTOR_ELT (ctor, i)->value;
+ else if (TREE_CODE (ftype) == REFERENCE_TYPE)
+ /* Value-initialization of reference is ill-formed. */
+ return NULL;
else
{
if (empty_ctor == NULL_TREE)
--- /dev/null
+// PR c++/58639
+// { dg-require-effective-target c++11 }
+
+struct node {
+ node &parent;
+};
+
+struct vector {
+ node n;
+};
+
+vector v({}); // { dg-error "" }