re PR c++/61924 ([C++11] ICE in instantiate_template_1, at cp/pt.c:15618)
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 12 Dec 2014 20:30:11 +0000 (20:30 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 12 Dec 2014 20:30:11 +0000 (20:30 +0000)
2014-12-12  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/61924
* g++.dg/cpp0x/pr61924.C: New.

From-SVN: r218690

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

index d0796b640f6b95ab600a5f040ca08225f2aae231..378f30973f3211f6d5cd906d4bf582d82029ed85 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-12  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/61924
+       * g++.dg/cpp0x/pr61924.C: New.
+
 2014-12-12  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR target/64110
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr61924.C b/gcc/testsuite/g++.dg/cpp0x/pr61924.C
new file mode 100644 (file)
index 0000000..7730f89
--- /dev/null
@@ -0,0 +1,17 @@
+// PR c++/61924
+// { dg-do compile { target c++11 } }
+
+struct function
+{
+  template < typename _Functor > function (_Functor); // { dg-error "never defined" }
+};
+
+template < typename > struct RetryingRpc
+{
+  template < typename StubType> RetryingRpc (StubType, function =[]{});
+};
+
+void fn()
+{
+  RetryingRpc<int> rpc(0, []{});
+}