re PR c++/80947 (Different visibility for the lambda and its capture list members...
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 18 Sep 2017 23:57:26 +0000 (23:57 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 18 Sep 2017 23:57:26 +0000 (23:57 +0000)
2017-09-18  Paolo Carlini  <paolo.carlini@oracle.com>

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

From-SVN: r252957

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

index c0de42aa5a60cdea005d50064880e3394cb4f012..c971f2ff3a1414623fcaec980f844d20dff7b5e0 100644 (file)
@@ -1,3 +1,8 @@
+2017-09-18  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/80947
+       * g++.dg/cpp0x/lambda/lambda-80947.C: New.
+
 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
 
        * gcc.dg/vect/slp-multitypes-13.c: New test.
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-80947.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-80947.C
new file mode 100644 (file)
index 0000000..fe6faa7
--- /dev/null
@@ -0,0 +1,16 @@
+// { dg-do compile { target c++11 } }
+// { dg-require-visibility "" }
+// { dg-options "-fvisibility=hidden" }
+
+template<class T>
+class MyClass  {
+public:
+    MyClass() {
+        auto outer = [this]()
+            {
+                auto fn = [this]   { };
+            };
+    }
+};
+
+int main() { MyClass<int> r; }