diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C new file mode 100644 index 000000000..5409d5ca3 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C @@ -0,0 +1,14 @@ +// Test for conversion from stateless lambda to function pointer. + +// { dg-options -std=c++0x } +// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-hpux10* } } } } } + +inline void f() +{ + void (*pfn)() = []{}; +} + +int main() +{ + f(); +} |