2012-10-10 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Oct 2012 10:15:51 +0000 (10:15 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 10 Oct 2012 10:15:51 +0000 (10:15 +0000)
PR c++/53741
* g++.dg/cpp0x/lambda/lambda-ice9.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192298 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C [new file with mode: 0644]

index f72f597..fabb749 100644 (file)
@@ -1,5 +1,10 @@
 2012-10-10  Paolo Carlini  <paolo.carlini@oracle.com>
 
+       PR c++/53741
+       * g++.dg/cpp0x/lambda/lambda-ice9.C: New.
+
+2012-10-10  Paolo Carlini  <paolo.carlini@oracle.com>
+
        PR c++/50478
        * g++.dg/cpp0x/initlist67.C: New.
 
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C
new file mode 100644 (file)
index 0000000..0a88bc8
--- /dev/null
@@ -0,0 +1,18 @@
+// PR c++/53741
+// { dg-do compile { target c++11 } }
+
+struct X
+{
+  template <class T> static void bar() {}
+
+  template <class T> void foo(T p) 
+  {
+    [&] { bar<T>(); };
+  }
+};
+
+int main()
+{
+  X x;
+  x.foo(3);
+}