diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype1.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype1.C | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype1.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype1.C new file mode 100644 index 000000000..b36ca2167 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype1.C @@ -0,0 +1,22 @@ +// PR c++/59791 +// We force the gimple dump to trigger use of lang_decl_name. +// { dg-do compile { target c++11 } } +// { dg-options "-fdump-tree-gimple" } +// { dg-final { cleanup-tree-dump "gimple" } } + +template < class T > void +f (T t) +{ + int i = t; + [](int)->decltype (i + t) + { + return 0; + } + (0); +} + +void +foo () +{ + f (0); +} |