aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2017-03-06 17:38:42 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2017-03-06 17:38:42 +0000
commitbdbbf28d15945150b16406d1bce91db58a65ac08 (patch)
tree81b930f94647aecd7f58f630f327fa2ac045aea7 /gcc/cp/call.c
parent52564551d3b21bc1cf08d87de8a0682764753c8a (diff)
downloadgcc-bdbbf28d15945150b16406d1bce91db58a65ac08.zip
gcc-bdbbf28d15945150b16406d1bce91db58a65ac08.tar.gz
gcc-bdbbf28d15945150b16406d1bce91db58a65ac08.tar.bz2
PR c++/79796 - ICE with NSDMI and this pointer
PR c++/79796 - ICE with NSDMI and this pointer * call.c (build_over_call): Handle NSDMI with a 'this' by calling replace_placeholders. * g++.dg/cpp0x/nsdmi13.C: New test. From-SVN: r245927
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 5afec4f..86c7647 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -8047,6 +8047,9 @@ build_over_call (struct z_candidate *cand, int flags, tsubst_flags_t complain)
{
arg = cp_build_indirect_ref (arg, RO_NULL, complain);
val = build2 (MODIFY_EXPR, TREE_TYPE (to), to, arg);
+ if (cxx_dialect >= cxx14)
+ /* Handle NSDMI that refer to the object being initialized. */
+ replace_placeholders (arg, to);
}
else
{