[Bug c++/79796] [5/6/7 Regression] ICE with NSDMI and this pointer

2017-03-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79796

--- Comment #6 from Marek Polacek  ---
Author: mpolacek
Date: Mon Mar  6 17:38:42 2017
New Revision: 245927

URL: https://gcc.gnu.org/viewcvs?rev=245927=gcc=rev
Log:
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.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/nsdmi13.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/79796] [5/6/7 Regression] ICE with NSDMI and this pointer

2017-03-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79796

--- Comment #5 from Marek Polacek  ---
Surprisingly my naïve attempt to fix this works:

--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -8047,6 +8047,8 @@ 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)
+   replace_placeholders (arg, to);
}
   else
{


and the C++ testsuite passes.

[Bug c++/79796] [5/6/7 Regression] ICE with NSDMI and this pointer

2017-03-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79796

--- Comment #4 from Marek Polacek  ---
That was PR77659 which has been fixed on the trunk.

[Bug c++/79796] [5/6/7 Regression] ICE with NSDMI and this pointer

2017-03-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79796

--- Comment #3 from Marek Polacek  ---
gimplify_expr can't stomach  created in get_nsdmi. 
Wait, there's a dup or at least a very similar PR.

[Bug c++/79796] [5/6/7 Regression] ICE with NSDMI and this pointer

2017-03-02 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79796

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/79796] [5/6/7 Regression] ICE with NSDMI and this pointer

2017-03-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79796

Marek Polacek  changed:

   What|Removed |Added

   Target Milestone|--- |5.5

--- Comment #2 from Marek Polacek  ---
Started with r216750.

[Bug c++/79796] [5/6/7 Regression] ICE with NSDMI and this pointer

2017-03-01 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79796

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-03-01
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.