re PR c++/61636 (generic lambda: segfault / "cannot call member function without...
authorNathan Sidwell <nathan@acm.org>
Tue, 17 Jan 2017 18:22:34 +0000 (18:22 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Tue, 17 Jan 2017 18:22:34 +0000 (18:22 +0000)
commit8ddfdbc265cfe0da5b727559d3736876d0198afb
tree127551e9b5d51e1763e5a76af78e43a959b28a43
parentf46fe37e86aa04522258dad374d0c7bf9c443ed3
re PR c++/61636 (generic lambda: segfault / "cannot call member function without object")

PR c++/61636
* cp-tree.h (maybe_generic_this_capture): Declare.
* lambda.c (resolvable_dummy_lambda): New, broken out of ...
(maybe_resolve_dummy): ... here.  Call it.
(maybe_generic_this_capture): New.
* parser.c (cp_parser_postfix_expression): Speculatively capture
this in generic lambda in unresolved member function call.
* pt.c (tsubst_copy_and_build): Force hard error from failed
member function lookup in generic lambda.

PR c++/61636
* g++.dg/cpp1y/pr61636-1.C: New.
* g++.dg/cpp1y/pr61636-2.C: New.
* g++.dg/cpp1y/pr61636-3.C: New.

From-SVN: r244544
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/lambda.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1y/pr61636-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/pr61636-2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1y/pr61636-3.C [new file with mode: 0644]