diff options
author | Paolo Carlini <paolo@gcc.gnu.org> | 2017-11-29 21:54:18 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2017-11-29 21:54:18 +0000 |
commit | cc6fe784486b77d96bd4cb9cb1d6556c1d5480fb (patch) | |
tree | edced92b46072cae0548f7af7900988498be436a /gcc/cp/lambda.c | |
parent | e3704417fa5e3ab896ae766087783b098a2f2f8f (diff) | |
download | gcc-cc6fe784486b77d96bd4cb9cb1d6556c1d5480fb.zip gcc-cc6fe784486b77d96bd4cb9cb1d6556c1d5480fb.tar.gz gcc-cc6fe784486b77d96bd4cb9cb1d6556c1d5480fb.tar.bz2 |
re PR c++/82293 (ICE in nonlambda_method_basetype at gcc/cp/lambda.c:886)
/cp
2017-11-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/82293
* lambda.c (nonlambda_method_basetype): Don't use LAMBDA_TYPE_P
on a null type.
/testsuite
2017-11-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/82293
* g++.dg/cpp0x/lambda/lambda-ice24.C: New.
From-SVN: r255254
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r-- | gcc/cp/lambda.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index 8b8c127..c06f441 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -920,7 +920,7 @@ nonlambda_method_basetype (void) return NULL_TREE; type = current_class_type; - if (!LAMBDA_TYPE_P (type)) + if (!type || !LAMBDA_TYPE_P (type)) return type; /* Find the nearest enclosing non-lambda function. */ |