re PR c++/70383 (Bogus error when attempting to capture a reference to function by...
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 16 Nov 2017 10:36:51 +0000 (10:36 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 16 Nov 2017 10:36:51 +0000 (10:36 +0000)
2017-11-16  Paolo Carlini  <paolo.carlini@oracle.com>

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

From-SVN: r254808

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

index 29ddf92dc860f18910c9f1ac83503891b2f841c8..455b2411a1c9c45ecaecda8dfbdc58a48fb85fe0 100644 (file)
@@ -1,3 +1,8 @@
+2017-11-16  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/70383
+       * g++.dg/cpp0x/lambda/lambda-70383.C: New.
+
 2017-11-16  Julia Koval  <julia.koval@intel.com>
 
        * gcc.target/i386/avx512f-gf2p8mulb-2.c: New runtime tests.
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70383.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-70383.C
new file mode 100644 (file)
index 0000000..075ff66
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/70383
+// { dg-do compile { target c++11 } }
+
+void meow() {
+    void purr();
+    void (&f)() = purr;
+    [f]{};
+}