aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle4.C4
3 files changed, 5 insertions, 4 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
index 08d8bbf..417c185 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
@@ -1,6 +1,6 @@
// Test for conversion from stateless lambda to function pointer.
-// { dg-do compile { target c++11 } }
+// { dg-do compile { target c++11_only } }
// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-hpux10* } } } } }
inline void f()
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
index 220817a..20ef282a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
@@ -50,7 +50,8 @@ struct S {
template<typename T> struct R {
static int x;
};
-template<typename T> int R<T>::x = []{return 1;}();
+// "int i;" makes the op() non-constexpr in C++17.
+template<typename T> int R<T>::x = []{int i; return 1;}();
template int R<int>::x;
// Type of lambda in intializer of R<int>::x: N1RIiE1xMUlvE_E
// Corresponding operator(): _ZNK1RIiE1xMUlvE_clEv
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle4.C
index 0d37637..b63c277 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle4.C
@@ -4,8 +4,8 @@
template <class T>
struct A
{
- // { dg-final { scan-assembler "_ZNK1AIcE1pMUlvE_cvPFvvEEv" } }
- // { dg-final { scan-assembler "_ZNK1AIiE1pMUlvE_cvPFvvEEv" } }
+ // { dg-final { scan-assembler "_ZNK1AIcE1pMUlvE_clEv" } }
+ // { dg-final { scan-assembler "_ZNK1AIiE1pMUlvE_clEv" } }
void (*p)() = []{};
};