[PR c++/82878] pass-by-invisiref in lambda
commitcbc3b89fda8752ee376db4d75f1fda708becc6a0
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Nov 2017 14:39:00 +0000 (20 14:39 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Nov 2017 14:39:00 +0000 (20 14:39 +0000)
treeba5912c09897e80e79f8a222c41d3dfae9c08ccd
parent8b0ceab57cf1023d0afde4061cc237f59a028dd1
[PR c++/82878] pass-by-invisiref in lambda

https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01115.html
PR c++/82878
PR c++/78495
* call.c (build_call_a): Don't set CALL_FROM_THUNK_P for inherited
ctor.
* cp-gimplify.c (cp_genericize_r): Restore THUNK dereference
inhibibition check removed in previous c++/78495 change.

PR c++/82878
* g++.dg/cpp0x/pr82878.C: New.
* g++.dg/cpp1z/inh-ctor38.C: Check moves too.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254958 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-gimplify.c
gcc/cp/lambda.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C
gcc/testsuite/g++.dg/cpp0x/pr82878.C [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp1z/inh-ctor38.C