diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-02-18 17:22:14 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-02-18 17:22:14 +0000 |
commit | 1496e7d67b028d54ed7a2f0507d8c366057fa854 (patch) | |
tree | 36564de1b44b5c667d983aa94522af81ac22c6d0 /gcc/testsuite | |
parent | 237d62592af737acb7711b78f44304fcd18b3e13 (diff) | |
download | gcc-1496e7d67b028d54ed7a2f0507d8c366057fa854.zip gcc-1496e7d67b028d54ed7a2f0507d8c366057fa854.tar.gz gcc-1496e7d67b028d54ed7a2f0507d8c366057fa854.tar.bz2 |
re PR c++/47795 (internal compiler error: tree check: expected record_type or union_type or qual_union_type, have error_mark in finish_non_static_data_member, at cp/semantics.c:1513)
/cp
2011-02-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/47795
* semantics.c (finish_non_static_data_member): Early return if
object is error_mark_node.
/testsuite
2011-02-18 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/47795
* g++.dg/cpp0x/lambda/lambda-ice3.C: New.
From-SVN: r170275
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C new file mode 100644 index 0000000..8ff3647 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C @@ -0,0 +1,23 @@ +// PR c++/47795 +// { dg-options "-std=c++0x" } + +class Klass +{ + unsigned int local; +public: + bool dostuff(); +}; + +bool Klass::dostuff() +{ + auto f = []() -> bool { + if (local & 1) { return true; } // { dg-error "not captured" } + return false; + }; +} + +int main() +{ + Klass c; + return 0; +} |