From 7e12c0e0e0ee82ab75b0e791c9e5d8f02c8a48ab Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 18 Sep 2017 23:57:26 +0000 Subject: [PATCH] re PR c++/80947 (Different visibility for the lambda and its capture list members with -fvisibility=hidden) 2017-09-18 Paolo Carlini PR c++/80947 * g++.dg/cpp0x/lambda/lambda-80947.C: New. From-SVN: r252957 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/lambda/lambda-80947.C | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/lambda/lambda-80947.C diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c0de42aa5a6..c971f2ff3a1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-09-18 Paolo Carlini + + PR c++/80947 + * g++.dg/cpp0x/lambda/lambda-80947.C: New. + 2017-09-18 Richard Sandiford * 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 index 00000000000..fe6faa73f59 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-80947.C @@ -0,0 +1,16 @@ +// { dg-do compile { target c++11 } } +// { dg-require-visibility "" } +// { dg-options "-fvisibility=hidden" } + +template +class MyClass { +public: + MyClass() { + auto outer = [this]() + { + auto fn = [this] { }; + }; + } +}; + +int main() { MyClass r; } -- 2.30.2