diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/lambda')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice26.C | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice27.C | 8 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-vla1.C | 9 |
3 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice26.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice26.C new file mode 100644 index 00000000000..7544b270256 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice26.C @@ -0,0 +1,5 @@ +// PR c++/84455 +// { dg-do compile { target c++11 } } +// { dg-options "--param ggc-min-heapsize=0" } + +#include "lambda-ice14.C" diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice27.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice27.C new file mode 100644 index 00000000000..04c44a3b57f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice27.C @@ -0,0 +1,8 @@ +// PR c++/84446 +// { dg-do compile { target c++11 } } + +template<int> void foo() +{ + int i, + i = [] { virtual }(); // { dg-error "redeclaration|expected" } +} diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-vla1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-vla1.C new file mode 100644 index 00000000000..91498c4589a --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-vla1.C @@ -0,0 +1,9 @@ +// PR c++/84429 +// { dg-do compile { target c++11 } } +// { dg-options "" } + +void foo(int i) +{ + char x[i]; + [&]{ [&]{ return x; }; }; +} |