diff options
author | Jason Merrill <jason@redhat.com> | 2016-03-03 17:43:14 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2016-03-03 17:43:14 -0500 |
commit | 45c3e69bb74bf1342737233a21833181686c72e1 (patch) | |
tree | 35508299bf42f794f5584e92d5f5ae99e0166934 /gcc/cp | |
parent | 16dc6b178ad855c581670d85472f5f52835abb4b (diff) | |
download | gcc-45c3e69bb74bf1342737233a21833181686c72e1.zip gcc-45c3e69bb74bf1342737233a21833181686c72e1.tar.gz gcc-45c3e69bb74bf1342737233a21833181686c72e1.tar.bz2 |
* call.c (build_aggr_conv): Use get_nsdmi.
From-SVN: r233947
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/call.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a7ae483..6eae6fd 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 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. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 8d5582a..3ad3bd5 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -897,6 +897,8 @@ build_aggr_conv (tree type, tree ctor, int flags, tsubst_flags_t complain) 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; |