mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 18:20:51 +08:00
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
This commit is contained in:
parent
52564551d3
commit
bdbbf28d15
@ -1,3 +1,9 @@
|
||||
2017-03-06 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/79796 - ICE with NSDMI and this pointer
|
||||
* call.c (build_over_call): Handle NSDMI with a 'this' by calling
|
||||
replace_placeholders.
|
||||
|
||||
2017-03-06 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/79822
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -1,3 +1,8 @@
|
||||
2017-03-06 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/79796 - ICE with NSDMI and this pointer
|
||||
* g++.dg/cpp0x/nsdmi13.C: New test.
|
||||
|
||||
2017-03-06 Julia Koval <julia.koval@intel.com>
|
||||
|
||||
PR target/79793
|
||||
|
13
gcc/testsuite/g++.dg/cpp0x/nsdmi13.C
Normal file
13
gcc/testsuite/g++.dg/cpp0x/nsdmi13.C
Normal file
@ -0,0 +1,13 @@
|
||||
// PR c++/79796
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct A
|
||||
{
|
||||
A* p = this;
|
||||
};
|
||||
|
||||
void foo()
|
||||
{
|
||||
A a;
|
||||
a = A({});
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user