aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto33.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto33.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto33.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto33.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto33.C
new file mode 100644
index 000000000..dade5a8ba
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/auto33.C
@@ -0,0 +1,15 @@
+// PR c++/53484
+// { dg-do compile { target c++11 } }
+
+template<class T,class U> struct ST;
+template<class T> struct ST<T,T> {};
+
+template <class T>
+void f(T x){
+ [&]{
+ auto y = x;
+ ST<decltype(y),int>();
+ }();
+}
+
+int main(){ f(0); }