Rebase.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / lambda / lambda-this5.C
blob8974641643cb1a644b0fe4be66a233d2e19ffb72
1 // PR c++/53619
2 // { dg-do run { target c++11 } }
4 struct C {
5   int x;
6 };
7 struct B {
8   int q;
9 };
10 struct A : public B , C  {
11   void foo();
14 void A::foo() {
15   auto k = [this]() {return (void *)(&x);};
16   if (k() != (void*)&x)
17     __builtin_abort();
20 int main(int l, char **) {
21   A a; a.foo();