re PR c++/77655 (ICE on invalid c++ code on x86_64-linux-gnu (internal compiler error...
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 22 Feb 2018 10:44:04 +0000 (10:44 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 22 Feb 2018 10:44:04 +0000 (10:44 +0000)
2018-02-22  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/77655
* g++.dg/cpp0x/pr77655.C: New.

From-SVN: r257896

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

index 161d523..b4b8f17 100644 (file)
@@ -1,3 +1,8 @@
+2018-02-22  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/77655
+       * g++.dg/cpp0x/pr77655.C: New.
+
 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/84496
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr77655.C b/gcc/testsuite/g++.dg/cpp0x/pr77655.C
new file mode 100644 (file)
index 0000000..ab2e942
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/77655
+// { dg-do compile { target c++11 } }
+
+template <class F> void g(F);
+template <class... A>
+auto h(A &&... a) -> decltype(g(0, g<decltype(a)>(a)...)) {  // { dg-error "no matching" }
+  h([] {});  // { dg-error "no matching" }
+}
+
+int main() { 
+  h(); 
+  return 0; 
+}