2016-03-03 Jason Merrill <jason@redhat.com>
+ * call.c (build_aggr_conv): Use get_nsdmi.
+
PR c++/51406
* typeck.c (build_static_cast_1): Avoid folding back to lvalue.
if (i < CONSTRUCTOR_NELTS (ctor))
val = CONSTRUCTOR_ELT (ctor, i)->value;
+ else if (DECL_INITIAL (field))
+ val = get_nsdmi (field, /*ctor*/false);
else if (TREE_CODE (ftype) == REFERENCE_TYPE)
/* Value-initialization of reference is ill-formed. */
return NULL;
--- /dev/null
+// { dg-do compile { target c++14 } }
+
+struct A
+{
+ A(int);
+};
+
+struct B
+{
+ A a{42};
+};
+
+B f() { return {}; }