mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
e3704417fa
commit
cc6fe78448
|
|
@ -1,3 +1,9 @@
|
|||
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.
|
||||
|
||||
2017-11-29 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/82760 - memory corruption with aligned new.
|
||||
|
|
@ -12,7 +18,7 @@
|
|||
(note_break_stmt, note_iteration_stmt_body_start,
|
||||
note_iteration_stmt_body_end): Declare.
|
||||
* decl.c (struct cp_switch): Add has_default_p, break_stmt_seen_p
|
||||
and in_loop_body_p fields.
|
||||
and in_loop_body_p fields.
|
||||
(push_switch): Clear them.
|
||||
(pop_switch): Set SWITCH_STMT_CANNOT_FALLTHRU_P if has_default_p
|
||||
and !break_stmt_seen_p. Assert in_loop_body_p is false.
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
2017-11-29 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/82293
|
||||
* g++.dg/cpp0x/lambda/lambda-ice24.C: New.
|
||||
|
||||
2017-11-29 Will Schmidt <will_schmidt@vnet.ibm.com>
|
||||
|
||||
* gcc.target/powerpc/fold-vec-ld-char.c: Add lxv to expected output.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
// PR c++/82293
|
||||
// { dg-do compile { target c++11 } }
|
||||
// { dg-options "-Wshadow" }
|
||||
|
||||
template <typename>
|
||||
struct S {
|
||||
int f{[this](){return 42;}()};
|
||||
};
|
||||
|
||||
int main(){
|
||||
return S<int>{}.f;
|
||||
}
|
||||
Loading…
Reference in New Issue