aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-02-19 09:43:23 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-02-19 09:43:23 +0100
commitd5fe39d47c336e55acb80aa08e24e307e9262a83 (patch)
tree57dc50171b731116b5bbf9cd70fa03c53115fd3b /gcc/cp/lambda.c
parent50aaebab9410ae7afd6875fb396bdc23f6e4c32f (diff)
downloadgcc-d5fe39d47c336e55acb80aa08e24e307e9262a83.zip
gcc-d5fe39d47c336e55acb80aa08e24e307e9262a83.tar.gz
gcc-d5fe39d47c336e55acb80aa08e24e307e9262a83.tar.bz2
re PR c++/89387 (ICE in maybe_generic_this_capture at gcc/cp/lambda.c:945 since r268851)
PR c++/89387 * lambda.c (maybe_generic_this_capture): Don't check DECL_NONSTATIC_MEMBER_FUNCTION_P on USING_DECLs. * g++.dg/cpp0x/lambda/lambda-89387.C: New test. From-SVN: r269009
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r--gcc/cp/lambda.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 2290fe0..791c8de 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -941,7 +941,8 @@ maybe_generic_this_capture (tree object, tree fns)
fns = TREE_OPERAND (fns, 0);
for (lkp_iterator iter (fns); iter; ++iter)
- if ((!id_expr || TREE_CODE (*iter) == TEMPLATE_DECL)
+ if (((!id_expr && TREE_CODE (*iter) != USING_DECL)
+ || TREE_CODE (*iter) == TEMPLATE_DECL)
&& DECL_NONSTATIC_MEMBER_FUNCTION_P (*iter))
{
/* Found a non-static member. Capture this. */