re PR c++/78648 (ICE on invalid C++ code on x86_64-linux-gnu (Segmentation fault...
authorPaolo Carlini <paolo.carlini@oracle.com>
Fri, 15 Sep 2017 16:31:15 +0000 (16:31 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 15 Sep 2017 16:31:15 +0000 (16:31 +0000)
2017-09-13  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/78648
* g++.dg/cpp0x/lambda/lambda-ice21.C: New.

From-SVN: r252829

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

index 240544f036a4bf6421ce0ee7d125d5827b0ef771..bdc79b61e0456432adc377f60a3b049f91382c85 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/78648
+       * g++.dg/cpp0x/lambda/lambda-ice21.C: New.
+
 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
 
        PR tree-optimization/71026
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice21.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice21.C
new file mode 100644 (file)
index 0000000..34354bd
--- /dev/null
@@ -0,0 +1,10 @@
+// PR c++/78648
+// { dg-do compile { target c++11 } }
+
+template <typename F> void e(F) {}
+
+template <int> void bar() {
+  e([](const void) {}); // { dg-error "invalid use" }
+}
+
+void baz() { bar<1>; }